All of
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <>
To: unlisted-recipients:; (no To-header on input)
	Mauro Carvalho Chehab <>,
	Stephen Boyd <>,,
Subject: [PATCH] spmi: get rid of a warning when built with W=1
Date: Wed, 12 Aug 2020 14:29:18 +0200	[thread overview]
Message-ID: <> (raw)

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.

Signed-off-by: Mauro Carvalho Chehab <>
 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)
-	dummy = device_for_each_child(&ctrl->dev, NULL,
-				      spmi_ctrl_remove_device);
+	device_for_each_child(&ctrl->dev, NULL, spmi_ctrl_remove_device);

             reply	other threads:[~2020-08-12 12:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 12:29 Mauro Carvalho Chehab [this message]
2020-08-15  9:03 ` [PATCH] spmi: get rid of a warning when built with W=1 Stephen Boyd
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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.