From: Jean Delvare <jdelvare@suse.de>
To: Linux I2C <linux-i2c@vger.kernel.org>
Cc: Daniel Kurtz <djkurtz@chromium.org>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: i801: Drop needless bit-wise OR
Date: Wed, 25 May 2016 09:37:02 +0200 [thread overview]
Message-ID: <20160525093702.64d7309c@endymion> (raw)
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
next reply other threads:[~2016-05-25 7:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 7:37 Jean Delvare [this message]
2016-05-26 8:36 ` [PATCH] i2c: i801: Drop needless bit-wise OR 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160525093702.64d7309c@endymion \
--to=jdelvare@suse.de \
--cc=djkurtz@chromium.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).