All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] mantis: cleanup a warning
@ 2015-06-18 17:32 Mauro Carvalho Chehab
  2015-06-21 20:02 ` Jan Klötzke
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2015-06-18 17:32 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, Jan Klötzke

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/mantis/mantis_i2c.c: In function 'mantis_i2c_init':
drivers/media/pci/mantis/mantis_i2c.c:222:15: warning: variable 'intmask' set but not used [-Wunused-but-set-variable]
  u32 intstat, intmask;

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

diff --git a/drivers/media/pci/mantis/mantis_i2c.c b/drivers/media/pci/mantis/mantis_i2c.c
index a93823490a43..d72ee47dc6e4 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,7 @@ int mantis_i2c_init(struct mantis_pci *mantis)
 	dprintk(MANTIS_DEBUG, 1, "Initializing I2C ..");
 
 	intstat = mmread(MANTIS_INT_STAT);
-	intmask = mmread(MANTIS_INT_MASK);
+	mmread(MANTIS_INT_MASK);
 	mmwrite(intstat, MANTIS_INT_STAT);
 	dprintk(MANTIS_DEBUG, 1, "Disabling I2C interrupt");
 	mantis_mask_ints(mantis, MANTIS_INT_I2CDONE);
-- 
2.4.3


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

* Re: [PATCH] [media] mantis: cleanup a warning
  2015-06-18 17:32 [PATCH] [media] mantis: cleanup a warning Mauro Carvalho Chehab
@ 2015-06-21 20:02 ` Jan Klötzke
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Klötzke @ 2015-06-21 20:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, Mauro Carvalho Chehab

Hi Mauro,

my bad. 

On Thu, Jun 18, 2015 at 02:32:39PM -0300, Mauro Carvalho Chehab wrote:
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> drivers/media/pci/mantis/mantis_i2c.c: In function 'mantis_i2c_init':
> drivers/media/pci/mantis/mantis_i2c.c:222:15: warning: variable 'intmask' set but not used [-Wunused-but-set-variable]
>   u32 intstat, intmask;
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> diff --git a/drivers/media/pci/mantis/mantis_i2c.c b/drivers/media/pci/mantis/mantis_i2c.c
> index a93823490a43..d72ee47dc6e4 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,7 @@ int mantis_i2c_init(struct mantis_pci *mantis)
>  	dprintk(MANTIS_DEBUG, 1, "Initializing I2C ..");
>  
>  	intstat = mmread(MANTIS_INT_STAT);
> -	intmask = mmread(MANTIS_INT_MASK);
> +	mmread(MANTIS_INT_MASK);

I'm not sure if the mmread() is still needed. But as I don't have any
docs about the chipset I would keep it because that's how it has been
tested. I could re-test without it but I guess nobody cares about the
extra mmread() in the init path anyway.

Acked-by: Jan Klötzke <jan@kloetzke.net>

Regards,
Jan

>  	mmwrite(intstat, MANTIS_INT_STAT);
>  	dprintk(MANTIS_DEBUG, 1, "Disabling I2C interrupt");
>  	mantis_mask_ints(mantis, MANTIS_INT_I2CDONE);
> -- 
> 2.4.3
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 17:32 [PATCH] [media] mantis: cleanup a warning Mauro Carvalho Chehab
2015-06-21 20:02 ` Jan Klötzke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.