Message ID | 103951a0-4233-bbaf-2192-ac140469b07e@gmail.com |
---|---|
State | Accepted |
Commit | 78f420acc4231f7db99291d846bc73d5f8a8df72 |
Headers | show |
Series | i2c: i801: Replace waitqueue with completion API | expand |
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
On Tue, May 25, 2021 at 12:00:12PM +0200, Jean Delvare wrote: > 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> Applied to for-next, thanks!
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); }
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(-)