Em Thu, 11 Jun 2015 08:05:25 +0200
Hans Verkuil <hverk...@xs4all.nl> escreveu:

> mantis_i2c.c:222:15: warning: variable 'intmask' set but not used 
> [-Wunused-but-set-variable]
>   u32 intstat, intmask;
>                ^
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> 
> diff --git a/drivers/media/pci/mantis/mantis_i2c.c 
> b/drivers/media/pci/mantis/mantis_i2c.c
> index a938234..9abe1c7 100644
> --- a/drivers/media/pci/mantis/mantis_i2c.c
> +++ b/drivers/media/pci/mantis/mantis_i2c.c
> @@ -219,7 +219,7 @@ static struct i2c_algorithm mantis_algo = {
>  
>  int mantis_i2c_init(struct mantis_pci *mantis)
>  {
> -     u32 intstat, intmask;
> +     u32 intstat;
>       struct i2c_adapter *i2c_adapter = &mantis->adapter;
>       struct pci_dev *pdev            = mantis->pdev;
>  
> @@ -242,7 +242,6 @@ int mantis_i2c_init(struct mantis_pci *mantis)
>       dprintk(MANTIS_DEBUG, 1, "Initializing I2C ..");
>  
>       intstat = mmread(MANTIS_INT_STAT);
> -     intmask = mmread(MANTIS_INT_MASK);

Doing this sounds too risky for me without enough info from this
device, as reading the mask could be needed in order to reset the
IRQ.

I added earlier today a patch that keeps the mmread() there, just
removing the temporary unused var.

>       mmwrite(intstat, MANTIS_INT_STAT);
>       dprintk(MANTIS_DEBUG, 1, "Disabling I2C interrupt");
>       mantis_mask_ints(mantis, MANTIS_INT_I2CDONE);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to