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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A620C433F5 for ; Thu, 13 Jan 2022 06:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbiAMGGH (ORCPT ); Thu, 13 Jan 2022 01:06:07 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:38242 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231205AbiAMGGG (ORCPT ); Thu, 13 Jan 2022 01:06:06 -0500 X-UUID: ccfd07641bb4491a9d856d3e5b2f3b67-20220113 X-UUID: ccfd07641bb4491a9d856d3e5b2f3b67-20220113 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1129358751; Thu, 13 Jan 2022 14:06:02 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 13 Jan 2022 14:06:01 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Jan 2022 14:05:59 +0800 Message-ID: <18d7e049adc69f4b7f0ecfdf8520a02bd6e17149.camel@mediatek.com> Subject: Re: [PATCH v2 4/6] memory: mtk-smi: Fix the return value for clk_bulk_prepare_enable From: Yong Wu To: AngeloGioacchino Del Regno , Krzysztof Kozlowski CC: Rob Herring , Matthias Brugger , Krzysztof Kozlowski , "Joerg Roedel" , Will Deacon , Robin Murphy , Tomasz Figa , , , , , , , , , , , Date: Thu, 13 Jan 2022 14:05:59 +0800 In-Reply-To: <00efa277-6475-4f20-f045-443a0706e9e2@collabora.com> References: <20220111063904.7583-1-yong.wu@mediatek.com> <20220111063904.7583-5-yong.wu@mediatek.com> <00efa277-6475-4f20-f045-443a0706e9e2@collabora.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, 2022-01-11 at 10:10 +0100, AngeloGioacchino Del Regno wrote: > Il 11/01/22 07:39, Yong Wu ha scritto: > > The successful return value for clk_bulk_prepare_enable is 0, > > rather than > > "< 0". Fix this. > > > > Hello! Thanks for this commit! > However, there are a few comments... > > This description is a bit confusing, please reword it, something > like... > > "Function clk_bulk_prepare_enable() returns 0 for success or a > negative > number for error. Fix this code style issue." Thanks for your quickly reviewing. I will use this in next version and remove the "Fixes" tag. > > In any case, you're not fixing any bad logic issue here, as the > function > will never return anything > 0. > > What you're fixing is a common pattern usage issue, so the Fixes tag > can be > removed since it's not really useful to schedule this commit for > backport > over older stable versions. > > > After the requested changes: > > Reviewed-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > > > Fixes: 0e14917c57f9 ("memory: mtk-smi: Use clk_bulk clock ops") > > Signed-off-by: Yong Wu > > --- > > drivers/memory/mtk-smi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > > index b883dcc0bbfa..e7b1a22b12ea 100644 > > --- a/drivers/memory/mtk-smi.c > > +++ b/drivers/memory/mtk-smi.c > > @@ -480,7 +480,7 @@ static int __maybe_unused > > mtk_smi_larb_resume(struct device *dev) > > int ret; > > > > ret = clk_bulk_prepare_enable(larb->smi.clk_num, larb- > > >smi.clks); > > - if (ret < 0) > > + if (ret) > > return ret; > > > > /* Configure the basic setting for this larb */ > > > >