From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jean Delvare <jdelvare@suse.de>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
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: Re: i2c: i801: Drop needless bit-wise OR
Date: Wed, 8 Jun 2016 18:30:32 +0200 [thread overview]
Message-ID: <20160608163032.GB24234@mail.corp.redhat.com> (raw)
In-Reply-To: <20160525093702.64d7309c@endymion>
On May 25 2016 or thereabouts, Jean Delvare wrote:
> 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>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
Looks good to me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> 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);
> }
>
next prev parent reply other threads:[~2016-06-08 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-06-09 20:28 ` 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=20160608163032.GB24234@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=djkurtz@chromium.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=jdelvare@suse.de \
--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).