From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
"John Stultz" <john.stultz@linaro.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] spmi: get rid of a warning when built with W=1
Date: Tue, 29 Sep 2020 08:22:12 +0200 [thread overview]
Message-ID: <aacfd03835b7d1b3b6c21665b44000fe7242e535.1601360391.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1601360391.git.mchehab+huawei@kernel.org>
The SPMI core complaing with this warning when built with W=1:
drivers/spmi/spmi.c: In function ‘spmi_controller_remove’:
drivers/spmi/spmi.c:548:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
548 | int dummy;
| ^~~~~
As the dummy var isn't needed, remove it.
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/spmi/spmi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index c16b60f645a4..fd3ff6079b15 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -545,13 +545,10 @@ static int spmi_ctrl_remove_device(struct device *dev, void *data)
*/
void spmi_controller_remove(struct spmi_controller *ctrl)
{
- int dummy;
-
if (!ctrl)
return;
- dummy = device_for_each_child(&ctrl->dev, NULL,
- spmi_ctrl_remove_device);
+ device_for_each_child(&ctrl->dev, NULL, spmi_ctrl_remove_device);
device_del(&ctrl->dev);
}
EXPORT_SYMBOL_GPL(spmi_controller_remove);
--
2.26.2
next prev parent reply other threads:[~2020-09-29 6:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 6:22 [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Mauro Carvalho Chehab
2020-09-29 6:22 ` Mauro Carvalho Chehab [this message]
2020-11-13 20:47 ` [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Stephen Boyd
2020-09-29 6:22 ` [PATCH v2 2/2] spmi: fix some coding style issues at the spmi core Mauro Carvalho Chehab
2020-09-29 9:13 ` Marc Gonzalez
2020-11-13 20:47 ` Stephen Boyd
2020-10-02 21:22 ` [PATCH v2 0/2] Some small cleanup/fixes for SPMI driver Stephen Boyd
2020-10-03 10:56 ` Greg Kroah-Hartman
2020-10-14 21:26 ` Stephen Boyd
2020-10-15 12:55 ` Greg Kroah-Hartman
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aacfd03835b7d1b3b6c21665b44000fe7242e535.1601360391.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=john.stultz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mani@kernel.org \
--cc=mauro.chehab@huawei.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).