Re: [PATCH -next] i2c: designware: Fix unused variable warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 05, 2019 at 05:31:08PM +0800, Shaokun Zhang wrote:
> drivers/i2c/busses/i2c-designware-master.c: In function ‘i2c_dw_init_recovery_info’:
> drivers/i2c/busses/i2c-designware-master.c:658:6: warning: unused variable ‘r’ [-Wunused-variable]
>   int r;
>       ^

Thanks,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

> Fixes: 33eb09a02e8d ("i2c: designware: make use of devm_gpiod_get_optional")
> Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
> Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> 
> Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> 
> Cc: Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Shaokun Zhang <zhangshaokun@xxxxxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-designware-master.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
> index 867787dade43..e8b328242256 100644
> --- a/drivers/i2c/busses/i2c-designware-master.c
> +++ b/drivers/i2c/busses/i2c-designware-master.c
> @@ -655,7 +655,6 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
>  	struct i2c_bus_recovery_info *rinfo = &dev->rinfo;
>  	struct i2c_adapter *adap = &dev->adapter;
>  	struct gpio_desc *gpio;
> -	int r;
>  
>  	gpio = devm_gpiod_get_optional(dev->dev, "scl", GPIOD_OUT_HIGH);
>  	if (IS_ERR_OR_NULL(gpio))
> -- 
> 2.7.4
> 

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux