* [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate
@ 2024-10-29 2:09 Jiapeng Chong
2024-10-29 14:34 ` Dmitry Baryshkov
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jiapeng Chong @ 2024-10-29 2:09 UTC (permalink / raw)
To: loic.poulain
Cc: rfoss, andi.shyti, linux-i2c, linux-arm-msm, linux-kernel,
Jiapeng Chong, Abaci Robot
Variable ret is not effectively used, so delete it.
drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
-Remove redundant code.
drivers/i2c/busses/i2c-qcom-cci.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index 5cc791b3b57d..a0ef43e99751 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -523,7 +523,6 @@ static const struct dev_pm_ops qcom_cci_pm = {
static int cci_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- unsigned long cci_clk_rate = 0;
struct device_node *child;
struct resource *r;
struct cci *cci;
@@ -594,14 +593,6 @@ static int cci_probe(struct platform_device *pdev)
return dev_err_probe(dev, -EINVAL, "not enough clocks in DT\n");
cci->nclocks = ret;
- /* Retrieve CCI clock rate */
- for (i = 0; i < cci->nclocks; i++) {
- if (!strcmp(cci->clocks[i].id, "cci")) {
- cci_clk_rate = clk_get_rate(cci->clocks[i].clk);
- break;
- }
- }
-
ret = cci_enable_clocks(cci);
if (ret < 0)
return ret;
--
2.32.0.3.g01195cf9f
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-29 2:09 [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate Jiapeng Chong @ 2024-10-29 14:34 ` Dmitry Baryshkov 2024-10-30 10:53 ` Vladimir Zapolskiy 2024-10-31 10:44 ` Andi Shyti 2 siblings, 0 replies; 9+ messages in thread From: Dmitry Baryshkov @ 2024-10-29 14:34 UTC (permalink / raw) To: Jiapeng Chong Cc: loic.poulain, rfoss, andi.shyti, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: > Variable ret is not effectively used, so delete it. > > drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > --- > Changes in v2: > -Remove redundant code. > > drivers/i2c/busses/i2c-qcom-cci.c | 9 --------- > 1 file changed, 9 deletions(-) Fixes: 823dfb7bdb21 ("i2c: qcom-cci: Stop complaining about DT set clock rate") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-29 2:09 [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate Jiapeng Chong 2024-10-29 14:34 ` Dmitry Baryshkov @ 2024-10-30 10:53 ` Vladimir Zapolskiy 2024-10-31 10:44 ` Andi Shyti 2 siblings, 0 replies; 9+ messages in thread From: Vladimir Zapolskiy @ 2024-10-30 10:53 UTC (permalink / raw) To: Jiapeng Chong, loic.poulain Cc: rfoss, andi.shyti, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot On 10/29/24 04:09, Jiapeng Chong wrote: > Variable ret is not effectively used, so delete it. Variable ret is not deleted, the commit message is misleading. > drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> With the needed change to the commit message: Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> -- Best wishes, Vladimir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-29 2:09 [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate Jiapeng Chong 2024-10-29 14:34 ` Dmitry Baryshkov 2024-10-30 10:53 ` Vladimir Zapolskiy @ 2024-10-31 10:44 ` Andi Shyti 2024-10-31 11:13 ` Vladimir Zapolskiy 2 siblings, 1 reply; 9+ messages in thread From: Andi Shyti @ 2024-10-31 10:44 UTC (permalink / raw) To: Jiapeng Chong Cc: loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot Hi Jiapeng, On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: > Variable ret is not effectively used, so delete it. > > drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> thanks for your patch! Applied to i2c/i2c-host Thanks, Andi ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-31 10:44 ` Andi Shyti @ 2024-10-31 11:13 ` Vladimir Zapolskiy 2024-10-31 11:35 ` Vladimir Zapolskiy 2024-10-31 11:41 ` Andi Shyti 0 siblings, 2 replies; 9+ messages in thread From: Vladimir Zapolskiy @ 2024-10-31 11:13 UTC (permalink / raw) To: Andi Shyti, Jiapeng Chong Cc: loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot Hi Andi, On 10/31/24 12:44, Andi Shyti wrote: > Hi Jiapeng, > > On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: >> Variable ret is not effectively used, so delete it. >> >> drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. >> >> Reported-by: Abaci Robot <abaci@linux.alibaba.com> >> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 >> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > > thanks for your patch! Applied to i2c/i2c-host > > Thanks, > Andi > FWIW I've noticed that my Reviewed-by tag was added to the accepted change, while it was the conditional one... Actually I don't know how to be aware of such nuances, if only b4 tool is used, likely there is no way for it. Hopefully I'm not too picky with it. -- Best wishes, Vladimir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-31 11:13 ` Vladimir Zapolskiy @ 2024-10-31 11:35 ` Vladimir Zapolskiy 2024-10-31 11:41 ` Andi Shyti 1 sibling, 0 replies; 9+ messages in thread From: Vladimir Zapolskiy @ 2024-10-31 11:35 UTC (permalink / raw) To: Andi Shyti Cc: loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot, Jiapeng Chong On 10/31/24 13:13, Vladimir Zapolskiy wrote: > Hi Andi, > > On 10/31/24 12:44, Andi Shyti wrote: >> Hi Jiapeng, >> >> On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: >>> Variable ret is not effectively used, so delete it. >>> >>> drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. >>> >>> Reported-by: Abaci Robot <abaci@linux.alibaba.com> >>> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 >>> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> >> >> thanks for your patch! Applied to i2c/i2c-host >> >> Thanks, >> Andi >> > > FWIW I've noticed that my Reviewed-by tag was added to the accepted change, > while it was the conditional one... Actually I don't know how to be aware > of such nuances, if only b4 tool is used, likely there is no way for it. > > Hopefully I'm not too picky with it. If it still matters, this one apparently unnoticed candidate would have been a better choice: https://lore.kernel.org/linux-i2c/20241031095339.76535-1-jiapeng.chong@linux.alibaba.com -- Best wishes, Vladimir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-31 11:13 ` Vladimir Zapolskiy 2024-10-31 11:35 ` Vladimir Zapolskiy @ 2024-10-31 11:41 ` Andi Shyti 2024-10-31 11:59 ` Vladimir Zapolskiy 1 sibling, 1 reply; 9+ messages in thread From: Andi Shyti @ 2024-10-31 11:41 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Jiapeng Chong, loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot Hi Vladimir, On Thu, Oct 31, 2024 at 01:13:24PM +0200, Vladimir Zapolskiy wrote: > Hi Andi, > > On 10/31/24 12:44, Andi Shyti wrote: > > Hi Jiapeng, > > > > On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: > > > Variable ret is not effectively used, so delete it. > > > > > > drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. > > > > > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > > > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 > > > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > > > > thanks for your patch! Applied to i2c/i2c-host > > > > Thanks, > > Andi > > > > FWIW I've noticed that my Reviewed-by tag was added to the accepted change, > while it was the conditional one... Actually I don't know how to be aware > of such nuances, if only b4 tool is used, likely there is no way for it. I thought the change that made your r-b conditional was the Fixes tag, right? That is added. Have I missed anything? (I noticed later the v3, but it's basically identical to the one I pushed). > Hopefully I'm not too picky with it. Absolutely not! Please, keep pinging me if you see anything I might have missed. Thanks, Andi ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-31 11:41 ` Andi Shyti @ 2024-10-31 11:59 ` Vladimir Zapolskiy 2024-10-31 12:23 ` Andi Shyti 0 siblings, 1 reply; 9+ messages in thread From: Vladimir Zapolskiy @ 2024-10-31 11:59 UTC (permalink / raw) To: Andi Shyti Cc: Jiapeng Chong, loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot Hi Andi, On 10/31/24 13:41, Andi Shyti wrote: > Hi Vladimir, > > On Thu, Oct 31, 2024 at 01:13:24PM +0200, Vladimir Zapolskiy wrote: >> Hi Andi, >> >> On 10/31/24 12:44, Andi Shyti wrote: >>> Hi Jiapeng, >>> >>> On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: >>>> Variable ret is not effectively used, so delete it. >>>> >>>> drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. >>>> >>>> Reported-by: Abaci Robot <abaci@linux.alibaba.com> >>>> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 >>>> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> >>> >>> thanks for your patch! Applied to i2c/i2c-host >>> >>> Thanks, >>> Andi >>> >> >> FWIW I've noticed that my Reviewed-by tag was added to the accepted change, >> while it was the conditional one... Actually I don't know how to be aware >> of such nuances, if only b4 tool is used, likely there is no way for it. > > I thought the change that made your r-b conditional was the > Fixes tag, right? That is added. Have I missed anything? ah, no, it was about the copy-pasted commit message, which mentions a much more popular 'ret' local variable. > (I noticed later the v3, but it's basically identical to the one > I pushed). > Well, I believe my concern about a commit message has quite low significance, so let it be kept as is, the most essential code change part is untouched. >> Hopefully I'm not too picky with it. > > Absolutely not! Please, keep pinging me if you see anything I > might have missed. Thank you! -- Best wishes, Vladmir ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate 2024-10-31 11:59 ` Vladimir Zapolskiy @ 2024-10-31 12:23 ` Andi Shyti 0 siblings, 0 replies; 9+ messages in thread From: Andi Shyti @ 2024-10-31 12:23 UTC (permalink / raw) To: Vladimir Zapolskiy Cc: Jiapeng Chong, loic.poulain, rfoss, linux-i2c, linux-arm-msm, linux-kernel, Abaci Robot Hi Vladimir, On Thu, Oct 31, 2024 at 01:59:45PM +0200, Vladimir Zapolskiy wrote: > On 10/31/24 13:41, Andi Shyti wrote: > > On Thu, Oct 31, 2024 at 01:13:24PM +0200, Vladimir Zapolskiy wrote: > > > On 10/31/24 12:44, Andi Shyti wrote: > > > > On Tue, Oct 29, 2024 at 10:09:31AM +0800, Jiapeng Chong wrote: > > > > > Variable ret is not effectively used, so delete it. > > > > > > > > > > drivers/i2c/busses/i2c-qcom-cci.c:526:16: warning: variable ‘cci_clk_rate’ set but not used. > > > > > > > > > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > > > > > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11532 > > > > > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > > > > > > > > thanks for your patch! Applied to i2c/i2c-host > > > > > > > > Thanks, > > > > Andi > > > > > > > > > > FWIW I've noticed that my Reviewed-by tag was added to the accepted change, > > > while it was the conditional one... Actually I don't know how to be aware > > > of such nuances, if only b4 tool is used, likely there is no way for it. > > > > I thought the change that made your r-b conditional was the > > Fixes tag, right? That is added. Have I missed anything? > > ah, no, it was about the copy-pasted commit message, which mentions a much > more popular 'ret' local variable. oh yes, the new commit message says: "Variable cci_clk_rate is not effectively used, so delete it." I'm sorry, I will fix it. Thanks, Andi ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-10-31 12:23 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-29 2:09 [PATCH v2 -next] i2c: qcom-cci: Remove the unused variable cci_clk_rate Jiapeng Chong 2024-10-29 14:34 ` Dmitry Baryshkov 2024-10-30 10:53 ` Vladimir Zapolskiy 2024-10-31 10:44 ` Andi Shyti 2024-10-31 11:13 ` Vladimir Zapolskiy 2024-10-31 11:35 ` Vladimir Zapolskiy 2024-10-31 11:41 ` Andi Shyti 2024-10-31 11:59 ` Vladimir Zapolskiy 2024-10-31 12:23 ` Andi Shyti
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox