mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
To: <linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <jdelvare@suse.com>, <wsa@the-dreams.de>, <CARLOS.PALMINHA@synopsys.com>
Subject: [PATCH 2/5] i2c: i2c-piix4: coding style fix - assignment in if condition
Date: Tue, 11 Oct 2016 18:24:38 +0100	[thread overview]
Message-ID: <20161011172441.7422-3-palminha@synopsys.com> (raw)
In-Reply-To: <20161011172441.7422-1-palminha@synopsys.com>

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 drivers/i2c/busses/i2c-piix4.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 6b55a8e..5d6f637 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -419,11 +419,13 @@ static int piix4_transaction(struct i2c_adapter *piix4_adapter)
 		inb_p(SMBHSTDAT1));
 
 	/* Make sure the SMBus host is ready to start transmitting */
-	if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+	temp = inb_p(SMBHSTSTS);
+	if (temp != 0x00) {
 		dev_dbg(&piix4_adapter->dev, "SMBus busy (%02x). "
 			"Resetting...\n", temp);
 		outb_p(temp, SMBHSTSTS);
-		if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+		temp = inb_p(SMBHSTSTS);
+		if (temp != 0x00) {
 			dev_err(&piix4_adapter->dev, "Failed! (%02x)\n", temp);
 			return -EBUSY;
 		} else {
@@ -470,7 +472,8 @@ static int piix4_transaction(struct i2c_adapter *piix4_adapter)
 	if (inb_p(SMBHSTSTS) != 0x00)
 		outb_p(inb(SMBHSTSTS), SMBHSTSTS);
 
-	if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+	temp = inb_p(SMBHSTSTS);
+	if (temp != 0x00) {
 		dev_err(&piix4_adapter->dev, "Failed reset at end of "
 			"transaction (%02x)\n", temp);
 	}
-- 
2.9.3

  parent reply	other threads:[~2016-10-11 18:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 17:24 [PATCH 0/5] i2c: i2c-piix4: set of coding style fixes Carlos Palminha
2016-10-11 17:24 ` [PATCH 1/5] i2c: i2c-piix4: coding style fix - '*' adjacent to data name Carlos Palminha
2016-10-11 17:24 ` Carlos Palminha [this message]
2016-10-11 17:24 ` [PATCH 3/5] i2c: i2c-piix4: coding style fix - long comments blocks Carlos Palminha
2016-10-13 11:30   ` Jean Delvare
2016-10-11 17:24 ` [PATCH 4/5] i2c: i2c-piix4: coding style fix - spaces with open parenthesis Carlos Palminha
2016-10-11 17:34 ` [PATCH 5/5] i2c: i2c-piix4: coding style fix - quoted string split across lines Carlos Palminha
2016-10-12  2:03   ` Joe Perches
2016-10-13 11:34     ` Jean Delvare
2016-10-13 11:40 ` [PATCH 0/5] i2c: i2c-piix4: set of coding style fixes Jean Delvare
2016-10-13 16:44   ` Carlos Palminha

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=20161011172441.7422-3-palminha@synopsys.com \
    --to=carlos.palminha@synopsys.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome