linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mantis: fix unused variable compiler warning
@ 2015-06-11  6:05 Hans Verkuil
  2015-06-18 20:57 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2015-06-11  6:05 UTC (permalink / raw)
  To: Linux Media Mailing List

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.verkuil@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);
 	mmwrite(intstat, MANTIS_INT_STAT);
 	dprintk(MANTIS_DEBUG, 1, "Disabling I2C interrupt");
 	mantis_mask_ints(mantis, MANTIS_INT_I2CDONE);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mantis: fix unused variable compiler warning
  2015-06-11  6:05 [PATCH] mantis: fix unused variable compiler warning Hans Verkuil
@ 2015-06-18 20:57 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2015-06-18 20:57 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

Em Thu, 11 Jun 2015 08:05:25 +0200
Hans Verkuil <hverkuil@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.verkuil@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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-18 20:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  6:05 [PATCH] mantis: fix unused variable compiler warning Hans Verkuil
2015-06-18 20:57 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).