]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iio: imu: st_lsm6dsx: remove set but not used variable ''
authorYueHaibing <yuehaibing@huawei.com>
Sat, 15 Dec 2018 06:31:24 +0000 (06:31 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Dec 2018 16:58:14 +0000 (16:58 +0000)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c: In function 'st_lsm6dsx_shub_read_reg':
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:108:41: warning:
 variable 'hub_settings' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit c91c1c844ebd ("iio: imu: st_lsm6dsx:
add i2c embedded controller support")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c

index 8e47dccdd40f58af220b2bb4e34f30ea2b94de22..66fbcd94642d42237476d537e2c5e563556be004 100644 (file)
@@ -105,12 +105,10 @@ static void st_lsm6dsx_shub_wait_complete(struct st_lsm6dsx_hw *hw)
 static int st_lsm6dsx_shub_read_reg(struct st_lsm6dsx_hw *hw, u8 addr,
                                    u8 *data, int len)
 {
-       const struct st_lsm6dsx_shub_settings *hub_settings;
        int err;
 
        mutex_lock(&hw->page_lock);
 
-       hub_settings = &hw->settings->shub_settings;
        err = st_lsm6dsx_set_page(hw, true);
        if (err < 0)
                goto out;