From patchwork Mon Feb 11 23:45:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10807011 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85D9F13BF for ; Mon, 11 Feb 2019 23:46:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7326A2AE8B for ; Mon, 11 Feb 2019 23:46:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64A222AEF7; Mon, 11 Feb 2019 23:46:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13C272AE8B for ; Mon, 11 Feb 2019 23:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbfBKXqM (ORCPT ); Mon, 11 Feb 2019 18:46:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:42310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727535AbfBKXqM (ORCPT ); Mon, 11 Feb 2019 18:46:12 -0500 Received: from lore-desk.lan (unknown [151.66.10.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC3CE20873; Mon, 11 Feb 2019 23:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549928771; bh=0UuwXlt/bXioGK5ReTI5f0+/p/SGhrNUOnDyZHGm7hc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QVv4FWwmvapqOF/fN87s1mV2IezGdkIyCtKfwAYQK1c0homXpaP9qgOd2Yo+tvJSK T8Ey1GCMZl8IddotZ/SQdjhlhcPPqnjz7fLR6vPgEUjTvBUeN0AdPBJklyu0gCzcOQ CEJJqQHDF9tFmJtaolUWvfWt2KaVl6XCASuiNx9A= From: lorenzo@kernel.org To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com, lorenzo@kernel.org Subject: [PATCH] mt76: usb: use dev_err_ratelimited instead of dev_err in mt76u_complete_rx Date: Tue, 12 Feb 2019 00:45:55 +0100 Message-Id: <25bdd32592a9e0e64d202b1a53c4680f0d958423.1549928358.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lorenzo Bianconi 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 --- 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;