2019-02-11 23:46:13

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH] mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

From: Lorenzo Bianconi <[email protected]>

During device removal the driver can report multiple error messages.
Use dev_err_ratelimited instead of dev_err to display urb errors

Signed-off-by: Lorenzo Bianconi <[email protected]>
---
drivers/net/wireless/mediatek/mt76/usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index 018a8cf0941e..10cd98d11fc2 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -446,7 +446,8 @@ static void mt76u_complete_rx(struct urb *urb)
case -ENOENT:
return;
default:
- dev_err(dev->dev, "rx urb failed: %d\n", urb->status);
+ dev_err_ratelimited(dev->dev, "rx urb failed: %d\n",
+ urb->status);
/* fall through */
case 0:
break;
--
2.20.1



2019-02-18 19:03:45

by Felix Fietkau

[permalink] [raw]
Subject: Re: [PATCH] mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx

On 2019-02-12 00:45, [email protected] wrote:
> From: Lorenzo Bianconi <[email protected]>
>
> During device removal the driver can report multiple error messages.
> Use dev_err_ratelimited instead of dev_err to display urb errors
>
> Signed-off-by: Lorenzo Bianconi <[email protected]>
Applied, thanks.

- Felix