linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: i801: Drop needless bit-wise OR
@ 2016-05-25  7:37 Jean Delvare
  2016-05-26  8:36 ` Mika Westerberg
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jean Delvare @ 2016-05-25  7:37 UTC (permalink / raw)
  To: Linux I2C; +Cc: Daniel Kurtz, Jarkko Nikula, Mika Westerberg, Wolfram Sang

The interrupt handling code makes it look like several status values
may be merged together before being processed, while this will never
happen. Change from bit-wise OR to simple assignment to make it more
obvious and avoid misunderstanding.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
Daniel, was there any reason for this bit-wise OR, which I may be
missing?

 drivers/i2c/busses/i2c-i801.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-4.5.orig/drivers/i2c/busses/i2c-i801.c	2016-05-24 11:04:33.169026906 +0200
+++ linux-4.5/drivers/i2c/busses/i2c-i801.c	2016-05-24 11:05:40.564642488 +0200
@@ -548,7 +548,7 @@ static irqreturn_t i801_isr(int irq, voi
 	status &= SMBHSTSTS_INTR | STATUS_ERROR_FLAGS;
 	if (status) {
 		outb_p(status, SMBHSTSTS(priv));
-		priv->status |= status;
+		priv->status = status;
 		wake_up(&priv->waitq);
 	}
 


-- 
Jean Delvare
SUSE L3 Support

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

end of thread, other threads:[~2016-06-09 20:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25  7:37 [PATCH] i2c: i801: Drop needless bit-wise OR Jean Delvare
2016-05-26  8:36 ` Mika Westerberg
2016-05-30 14:07 ` Daniel Kurtz
2016-06-01  9:37   ` Jean Delvare
2016-06-01  9:38     ` Daniel Kurtz
2016-06-02 11:45       ` Jean Delvare
2016-06-03 11:21         ` Daniel Kurtz
2016-06-08 16:30 ` Benjamin Tissoires
2016-06-09 20:28 ` [PATCH] " Wolfram Sang

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