linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: i801: Remove unneeded warning after wait_event_timeout timeout
Date: Tue, 25 May 2021 12:00:12 +0200	[thread overview]
Message-ID: <20210525120012.1ea1d5f1@endymion> (raw)
In-Reply-To: <103951a0-4233-bbaf-2192-ac140469b07e@gmail.com>

On Sat, 22 May 2021 00:00:28 +0200, Heiner Kallweit wrote:
> 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);
>  	}

I have to agree.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2021-05-25 10:00 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 ` [PATCH 1/2] i2c: i801: Remove unneeded warning after wait_event_timeout timeout Heiner Kallweit
2021-05-25 10:00   ` Jean Delvare [this message]
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=20210525120012.1ea1d5f1@endymion \
    --to=jdelvare@suse.de \
    --cc=hkallweit1@gmail.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).