Linux-LEDs Archive on lore.kernel.org
 help / color / Atom feed
From: Hongbo Yao <yaohongbo@huawei.com>
To: <jansimon.moeller@gmx.de>, <jacek.anaszewski@gmail.com>, <pavel@ucw.cz>
Cc: <yaohongbo@huawei.com>, <chenzhou10@huawei.com>,
	<linux-kernel@vger.kernel.org>, <linux-leds@vger.kernel.org>
Subject: [PATCH -next] leds: blinkm: remove set but not used variable
Date: Sat, 9 May 2020 22:23:57 +0800
Message-ID: <20200509142357.33702-1-yaohongbo@huawei.com> (raw)

Fixes gcc '-Wunused-but-set-variable' warning:
drivers/leds/leds-blinkm.c:483:6: warning: variable ‘ret’ set
but not used [-Wunused-but-set-variable]
  int ret;

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 drivers/leds/leds-blinkm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
index e11fe1788242..a493ee0e0fc7 100644
--- a/drivers/leds/leds-blinkm.c
+++ b/drivers/leds/leds-blinkm.c
@@ -480,9 +480,8 @@ static int blinkm_led_blue_set(struct led_classdev *led_cdev,
 
 static void blinkm_init_hw(struct i2c_client *client)
 {
-	int ret;
-	ret = blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
-	ret = blinkm_transfer_hw(client, BLM_GO_RGB);
+	blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
+	blinkm_transfer_hw(client, BLM_GO_RGB);
 }
 
 static int blinkm_test_run(struct i2c_client *client)
-- 
2.17.1


             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09 14:23 Hongbo Yao [this message]
2020-05-25 10:49 ` Pavel Machek

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=20200509142357.33702-1-yaohongbo@huawei.com \
    --to=yaohongbo@huawei.com \
    --cc=chenzhou10@huawei.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jansimon.moeller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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

Linux-LEDs Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-leds/0 linux-leds/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-leds linux-leds/ https://lore.kernel.org/linux-leds \
		linux-leds@vger.kernel.org
	public-inbox-index linux-leds

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-leds


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git