From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CA8BC43334 for ; Fri, 1 Jul 2022 12:05:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D28B08447E; Fri, 1 Jul 2022 14:04:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7EA5584485; Fri, 1 Jul 2022 14:04:56 +0200 (CEST) Received: from mail-m118111.qiye.163.com (mail-m118111.qiye.163.com [115.236.118.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 444018447A for ; Fri, 1 Jul 2022 14:04:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m118111.qiye.163.com (Hmail) with ESMTPA id 0B81B58018B; Fri, 1 Jul 2022 20:04:40 +0800 (CST) Message-ID: <3a2282cb-2a69-024a-a1a7-bcd1bceb34e9@rock-chips.com> Date: Fri, 1 Jul 2022 20:04:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/3] ram: rk3399: Fix .set_rate_index() error handling Content-Language: en-US To: Lee Jones , sjg@chromium.org, philipp.tomsich@vrull.eu Cc: cym@rock-chips.com, u-boot@lists.denx.de References: <20220621100729.979275-1-lee.jones@linaro.org> From: Kever Yang In-Reply-To: <20220621100729.979275-1-lee.jones@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVkaThhLVkIaQxodGk1MSkkdHlUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktISkxVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6K1E6MTo*Kz02KCk4Hj0tAzoo SCEaFA9VSlVKTU5NTUxMS0NLT01PVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFJSU5KNwY+ X-HM-Tid: 0a81b9a61c732eb7kusn0b81b58018b X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 2022/6/21 18:07, Lee Jones wrote: > Functions pointed to by this op pointer can return non-zero values > indicating an error. Ensure any error value is propagated back up the > call-chain. > > Signed-off-by: Lee Jones Reviewed-by: Kever Yang Thanks, - Kever > --- > drivers/ram/rockchip/sdram_rk3399.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c > index c0a06dcaed..0af0fa9e7b 100644 > --- a/drivers/ram/rockchip/sdram_rk3399.c > +++ b/drivers/ram/rockchip/sdram_rk3399.c > @@ -3005,7 +3005,9 @@ static int sdram_init(struct dram_info *dram, > params->base.stride = calculate_stride(params); > dram_all_config(dram, params); > > - dram->ops->set_rate_index(dram, params); > + ret = dram->ops->set_rate_index(dram, params); > + if (ret) > + return ret; > > debug("Finish SDRAM initialization...\n"); > return 0;