Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3354077pxb; Mon, 17 Jan 2022 18:24:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgLLlYvlAlCJAPWqm/HfrEhB76fPI7H7SWj+DioAd8cKoK9XRjn422D8Sk7B7oETGWRNiw X-Received: by 2002:a63:36c1:: with SMTP id d184mr21226287pga.102.1642472658086; Mon, 17 Jan 2022 18:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642472658; cv=none; d=google.com; s=arc-20160816; b=NDP2tlHn3s/JgJbHK81X7PWt5ihNPBySGvUOye2NV3KrbyB1NL6N0XsV2oXVbLhS6C 2D4x+vI15FmS5AJNfX1MmEVAg6MC76NibnyX6t1vYXWuu357AQXVFmc+/eyWfIdhoNaC 7gGwnTbsNB3MKV9SZfPn6QLDQfGIZtR0OYu10Erqebi3g5yzCAQwhREDIK4X4BwXM2p6 CEI3ms1ctjFxdokoTGOtaheiPGRH6+Tx+uMjvrvW87ObQCofDV/92r1HruksZU4p79WK 7SflW94AYeYcr3UeGudCRCA6ZHhjurG/K+szyh/pZTwhrV7/KWB0DkE1Gz0cp+PUoyPj nUQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=86LLihsUstRv0rx6zGBZaCqCxLnMXxWvL9WHOVR3JGE=; b=aUB0HX7SOUvb0v4PcKdHHP8WwFBRFgt6CvW82QRy7hBTX66FM9KUZWa8bEwP1EMDET 8B/LCHbnLiW5v26qb1kl+Yek+6QlreYaSXqcVA/+Zb3poqsqQmoI78V+LyZpKS77R5QN DyMkRHWrPQMXXJLmEYkuMgOQWTvdeq2GY/RFuhF5JA6LSMhzSLbZjIFelbf4JS3eucam zO8rBzgOkyYASn9y6HLak3eciINyz80iTARUJzKarKm8lav/WjpzCjkfRstXf5jFeUsH m1Yo4mz5eWU1BKovJzEIol0lR8WvR0VLgfc0WQdPxtsBJxF6qjz93X/R63kVnMfyNija Mg+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si5532735pls.433.2022.01.17.18.23.58; Mon, 17 Jan 2022 18:24:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236985AbiAQMZh (ORCPT + 99 others); Mon, 17 Jan 2022 07:25:37 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:37468 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231537AbiAQMZf (ORCPT ); Mon, 17 Jan 2022 07:25:35 -0500 X-UUID: 0984eb39b4094fda8f758cd6e9dcc5da-20220117 X-UUID: 0984eb39b4094fda8f758cd6e9dcc5da-20220117 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 728321395; Mon, 17 Jan 2022 20:25:31 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Mon, 17 Jan 2022 20:25:30 +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; Mon, 17 Jan 2022 20:25:29 +0800 Message-ID: <792f1119b9c848a01e8b8ddd196a1db7acc1f0ae.camel@mediatek.com> Subject: Re: [PATCH v3 5/7] memory: mtk-smi: Fix the return value for clk_bulk_prepare_enable From: Yong Wu To: Krzysztof Kozlowski CC: Rob Herring , Matthias Brugger , Joerg Roedel , Tomasz Figa , , , , , , , , , , , , AngeloGioacchino Del Regno , Joerg Roedel Date: Mon, 17 Jan 2022 20:25:28 +0800 In-Reply-To: <7370f18b-e273-69f2-1cc9-a42495e04874@canonical.com> References: <20220113111057.29918-1-yong.wu@mediatek.com> <20220113111057.29918-6-yong.wu@mediatek.com> <7370f18b-e273-69f2-1cc9-a42495e04874@canonical.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: linux-kernel@vger.kernel.org On Mon, 2022-01-17 at 13:01 +0100, Krzysztof Kozlowski wrote: > On 13/01/2022 12:10, Yong Wu wrote: > > Function clk_bulk_prepare_enable() returns 0 for success or a > > negative > > number for error. Fix this code style issue. > > The message does not really make sense. If negative is returned, then > the check (ret < 0) was correct. > > I guess you wanted to say that common code style is to check for any > non-zero return value, just like it's implementation in clk.h does. > > I'll adjust the commit msg when applying. Thanks for the help. > > > > > Signed-off-by: Yong Wu > > Reviewed-by: AngeloGioacchino Del Regno < > > angelogioacchino.delregno@collabora.com> > > --- > > 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 */ > > Best regards, > Krzysztof