eeprom: at24: Remove set but not used variable 'addr'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 29 May 2019 14:59:54 +0000 (22:59 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 31 May 2019 07:02:27 +0000 (09:02 +0200)
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>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/misc/eeprom/at24.c

index ba8e7381264471289689a194bb5b93085b397955..fa730bb342e856a21914479343830c29130cfb13 100644 (file)
@@ -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);