linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] eeprom: at24: Remove set but not used variable 'addr'
@ 2019-05-29 14:59 YueHaibing
  2019-05-31  7:10 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-05-29 14:59 UTC (permalink / raw)
  To: bgolaszewski, arnd, gregkh; +Cc: linux-kernel, linux-i2c, YueHaibing

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/misc/eeprom/at24.c: In function at24_make_dummy_client:
drivers/misc/eeprom/at24.c:514:21: warning: variable addr set but not used [-Wunused-but-set-variable]

It's not used since commit e7308628d0ae ("eeprom:
at24: use devm_i2c_new_dummy_device()")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/misc/eeprom/at24.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index ba8e73812644..fa730bb342e8 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -511,13 +511,11 @@ static int at24_make_dummy_client(struct at24_data *at24, unsigned int index,
 				  struct regmap_config *regmap_config)
 {
 	struct i2c_client *base_client, *dummy_client;
-	unsigned short int addr;
 	struct regmap *regmap;
 	struct device *dev;
 
 	base_client = at24->client[0].client;
 	dev = &base_client->dev;
-	addr = base_client->addr + index;
 
 	dummy_client = devm_i2c_new_dummy_device(dev, base_client->adapter,
 						 base_client->addr + index);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] eeprom: at24: Remove set but not used variable 'addr'
  2019-05-29 14:59 [PATCH -next] eeprom: at24: Remove set but not used variable 'addr' YueHaibing
@ 2019-05-31  7:10 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-05-31  7:10 UTC (permalink / raw)
  To: YueHaibing; +Cc: Arnd Bergmann, Greg KH, LKML, linux-i2c

śr., 29 maj 2019 o 17:00 YueHaibing <yuehaibing@huawei.com> napisał(a):
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/misc/eeprom/at24.c: In function at24_make_dummy_client:
> drivers/misc/eeprom/at24.c:514:21: warning: variable addr set but not used [-Wunused-but-set-variable]
>
> It's not used since commit e7308628d0ae ("eeprom:
> at24: use devm_i2c_new_dummy_device()")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/misc/eeprom/at24.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
> index ba8e73812644..fa730bb342e8 100644
> --- a/drivers/misc/eeprom/at24.c
> +++ b/drivers/misc/eeprom/at24.c
> @@ -511,13 +511,11 @@ static int at24_make_dummy_client(struct at24_data *at24, unsigned int index,
>                                   struct regmap_config *regmap_config)
>  {
>         struct i2c_client *base_client, *dummy_client;
> -       unsigned short int addr;
>         struct regmap *regmap;
>         struct device *dev;
>
>         base_client = at24->client[0].client;
>         dev = &base_client->dev;
> -       addr = base_client->addr + index;
>
>         dummy_client = devm_i2c_new_dummy_device(dev, base_client->adapter,
>                                                  base_client->addr + index);
> --
> 2.17.1
>
>

Applied, thanks!

Bart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-31  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 14:59 [PATCH -next] eeprom: at24: Remove set but not used variable 'addr' YueHaibing
2019-05-31  7:10 ` Bartosz Golaszewski

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).