Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220204

[PATCH] char: remove unused variable res to clean up build warning

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] char: remove unused variable res to clean up build warning
Date 2015-09-07 16:20 +0200
Message-ID <q65r3-7XI-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

Commit f368ed6088ae9 ("char: make misc_deregister a void function")
did not remove unused variable res and now we get a build warning:

drivers/rtc/rtc-ds1374.c: In function 'ds1374_remove':
drivers/rtc/rtc-ds1374.c:667:6: warning: unused variable 'res' 
[-Wunused-variable]
  int res;

simply remove this unused variable.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/rtc/rtc-ds1374.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 72c9333..36b1b84 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -663,9 +663,8 @@ static int ds1374_probe(struct i2c_client *client,
 static int ds1374_remove(struct i2c_client *client)
 {
 	struct ds1374 *ds1374 = i2c_get_clientdata(client);
-#ifdef CONFIG_RTC_DRV_DS1374_WDT
-	int res;
 
+#ifdef CONFIG_RTC_DRV_DS1374_WDT
 	misc_deregister(&ds1374_miscdev);
 	ds1374_miscdev.parent = NULL;
 	unregister_reboot_notifier(&ds1374_wdt_notifier);
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] char: remove unused variable res to clean up build warning Colin King <colin.king@canonical.com> - 2015-09-07 16:20 +0200

csiph-web