linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: tc358743: remove useless variable assignment in tc358743_isr
@ 2017-06-15 16:49 Gustavo A. R. Silva
  2017-06-16  7:28 ` Mats Randgaard (matrandg)
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-15 16:49 UTC (permalink / raw)
  To: Mats Randgaard, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Gustavo A. R. Silva

Remove useless variable assignment in function tc358743_isr().

The value stored in variable _intstatus_ at line 1299 is
overwritten at line 1302, just before it can be used.

Addresses-Coverity-ID: 1397678
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/media/i2c/tc358743.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 3251cba..e8b23f3 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1296,7 +1296,6 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
 			tc358743_csi_err_int_handler(sd, handled);
 
 		i2c_wr16(sd, INTSTATUS, MASK_CSI_INT);
-		intstatus &= ~MASK_CSI_INT;
 	}
 
 	intstatus = i2c_rd16(sd, INTSTATUS);
-- 
2.5.0

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

* Re: [PATCH] i2c: tc358743: remove useless variable assignment in tc358743_isr
  2017-06-15 16:49 [PATCH] i2c: tc358743: remove useless variable assignment in tc358743_isr Gustavo A. R. Silva
@ 2017-06-16  7:28 ` Mats Randgaard (matrandg)
  0 siblings, 0 replies; 2+ messages in thread
From: Mats Randgaard (matrandg) @ 2017-06-16  7:28 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

Thanks!
You could remove

intstatus &= ~MASK_HDMI_INT;

in line 1289 as well.

Regards,
Mats Randgaard

On 15/06/2017, 18:49, "Gustavo A. R. Silva" <garsilva@embeddedor.com> wrote:

    Remove useless variable assignment in function tc358743_isr().
    
    The value stored in variable _intstatus_ at line 1299 is
    overwritten at line 1302, just before it can be used.
    
    Addresses-Coverity-ID: 1397678
    Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
    ---
     drivers/media/i2c/tc358743.c | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
    index 3251cba..e8b23f3 100644
    --- a/drivers/media/i2c/tc358743.c
    +++ b/drivers/media/i2c/tc358743.c
    @@ -1296,7 +1296,6 @@ static int tc358743_isr(struct v4l2_subdev *sd, u32 status, bool *handled)
     			tc358743_csi_err_int_handler(sd, handled);
     
     		i2c_wr16(sd, INTSTATUS, MASK_CSI_INT);
    -		intstatus &= ~MASK_CSI_INT;
     	}
     
     	intstatus = i2c_rd16(sd, INTSTATUS);
    -- 
    2.5.0
    
    

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

end of thread, other threads:[~2017-06-16  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15 16:49 [PATCH] i2c: tc358743: remove useless variable assignment in tc358743_isr Gustavo A. R. Silva
2017-06-16  7:28 ` Mats Randgaard (matrandg)

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).