linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: [PATCH 1/2] i2c: i801: Remove unneeded warning after wait_event_timeout timeout
Date: Sat, 22 May 2021 00:00:28 +0200	[thread overview]
Message-ID: <103951a0-4233-bbaf-2192-ac140469b07e@gmail.com> (raw)
In-Reply-To: <561b74ab-b020-b0c7-c1ad-b7c3326245e3@gmail.com>

When passing -ETIMEDOUT to i801_check_post() it will emit a timeout
error message. I don't see much benefit in an additional warning
stating more or less the same.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/i2c/busses/i2c-i801.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 99d446763..bfea94d02 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -509,11 +509,9 @@ static int i801_transaction(struct i801_priv *priv, int xact)
 		result = wait_event_timeout(priv->waitq,
 					    (status = priv->status),
 					    adap->timeout);
-		if (!result) {
+		if (!result)
 			status = -ETIMEDOUT;
-			dev_warn(&priv->pci_dev->dev,
-				 "Timeout waiting for interrupt!\n");
-		}
+
 		priv->status = 0;
 		return i801_check_post(priv, status);
 	}
@@ -732,11 +730,9 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
 		result = wait_event_timeout(priv->waitq,
 					    (status = priv->status),
 					    adap->timeout);
-		if (!result) {
+		if (!result)
 			status = -ETIMEDOUT;
-			dev_warn(&priv->pci_dev->dev,
-				 "Timeout waiting for interrupt!\n");
-		}
+
 		priv->status = 0;
 		return i801_check_post(priv, status);
 	}
-- 
2.31.1



  reply	other threads:[~2021-05-21 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 21:59 [PATCH 0/2] i2c: i801: Replace waitqueue with completion API Heiner Kallweit
2021-05-21 22:00 ` Heiner Kallweit [this message]
2021-05-25 10:00   ` [PATCH 1/2] i2c: i801: Remove unneeded warning after wait_event_timeout timeout Jean Delvare
2021-05-27 20:09     ` Wolfram Sang
2021-05-21 22:02 ` [PATCH 2/2] i2c: i801: Replace waitqueue with completion API Heiner Kallweit
2021-05-25 12:12   ` Jean Delvare
2021-05-25 13:01     ` Heiner Kallweit
2021-05-27  7:13       ` Daniel Kurtz
2021-05-27 20:09   ` 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=103951a0-4233-bbaf-2192-ac140469b07e@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    /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).