diff mbox

[RESEND,v9,2/2] media: dw9807: Add dw9807 vcm driver

Message ID 20180509160332.75c1eb1b@vento.lan (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab May 9, 2018, 7:03 p.m. UTC
Em Wed,  2 May 2018 23:53:48 +0800
Andy Yeh <andy.yeh@intel.com> escreveu:

> From: Alan Chiang <alanx.chiang@intel.com>
> 
> DW9807 is a 10 bit DAC from Dongwoon, designed for linear
> control of voice coil motor.
> 
> This driver creates a V4L2 subdevice and
> provides control to set the desired focus.
> 
> Signed-off-by: Andy Yeh <andy.yeh@intel.com>
> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> Acked-by: Rob Herring <robh@kernel.org>

This adds a new warning.

Thanks,
Mauro
 
    drivers/media/i2c/dw9807.c: In function 'dw9807_set_dac':
    drivers/media/i2c/dw9807.c:81:16: warning: unused variable 'retry' [-Wunused-variable]
      int val, ret, retry = 0;
                    ^
    
Please either fix or fold the following patch.

Comments

Yeh, Andy May 16, 2018, 3:28 p.m. UTC | #1
Hi Mauro,


>-----Original Message-----
>From: Mauro Carvalho Chehab [mailto:mchehab+samsung@kernel.org] 
>Sent: Thursday, May 10, 2018 3:04 AM
>To: Yeh, Andy <andy.yeh@intel.com>
>Cc: linux-media@vger.kernel.org; sakari.ailus@linux.intel.com; devicetree@vger.kernel.org; tfiga@chromium.org; jacopo@jmondi.org; Chiang, AlanX <alanx.chiang@intel.com>
>Subject: Re: [RESEND PATCH v9 2/2] media: dw9807: Add dw9807 vcm driver
>
>This adds a new warning.
>
>Thanks,
>Mauro
> 
>    drivers/media/i2c/dw9807.c: In function 'dw9807_set_dac':
>    drivers/media/i2c/dw9807.c:81:16: warning: unused variable 'retry' [-Wunused-variable]
>      int val, ret, retry = 0;
>                    ^
>    
>Please either fix or fold the following patch.
>

I noticed you just submitted a patch to the list to address the warning. Thanks.
https://patchwork.linuxtv.org/patch/49575/

Just in the meantime, I uploaded the same one before noticing your patch.  I would like to obsolete mine, so let me know if you agree too. Thanks.
https://patchwork.linuxtv.org/patch/49574/


Regards, Andy

>diff --git a/drivers/media/i2c/dw9807.c b/drivers/media/i2c/dw9807.c index 28ede2b47acf..6ebb98717fb1 100644
>--- a/drivers/media/i2c/dw9807.c
>+++ b/drivers/media/i2c/dw9807.c
>@@ -78,7 +78,7 @@ static int dw9807_set_dac(struct i2c_client *client, u16 data)
>        const char tx_data[3] = {
>                DW9807_MSB_ADDR, ((data >> 8) & 0x03), (data & 0xff)
>        };
>-       int val, ret, retry = 0;
>+       int val, ret;
> 
>        /*
>         * According to the datasheet, need to check the bus status before we
diff mbox

Patch

diff --git a/drivers/media/i2c/dw9807.c b/drivers/media/i2c/dw9807.c
index 28ede2b47acf..6ebb98717fb1 100644
--- a/drivers/media/i2c/dw9807.c
+++ b/drivers/media/i2c/dw9807.c
@@ -78,7 +78,7 @@  static int dw9807_set_dac(struct i2c_client *client, u16 data)
        const char tx_data[3] = {
                DW9807_MSB_ADDR, ((data >> 8) & 0x03), (data & 0xff)
        };
-       int val, ret, retry = 0;
+       int val, ret;
 
        /*
         * According to the datasheet, need to check the bus status before we