From patchwork Tue Oct 15 11:45:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 283608 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 617C52C008E for ; Tue, 15 Oct 2013 23:05:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932874Ab3JOME5 (ORCPT ); Tue, 15 Oct 2013 08:04:57 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:24292 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182Ab3JOL6B (ORCPT ); Tue, 15 Oct 2013 07:58:01 -0400 Received: from 172.24.2.119 (EHLO szxeml211-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.4-GA FastPath queued) with ESMTP id BJG81518; Tue, 15 Oct 2013 19:57:49 +0800 (CST) Received: from SZXEML452-HUB.china.huawei.com (10.82.67.195) by szxeml211-edg.china.huawei.com (172.24.2.182) with Microsoft SMTP Server (TLS) id 14.3.146.0; Tue, 15 Oct 2013 19:57:49 +0800 Received: from localhost (10.135.68.221) by szxeml452-hub.china.huawei.com (10.82.67.195) with Microsoft SMTP Server id 14.3.146.0; Tue, 15 Oct 2013 19:57:41 +0800 From: Kefeng Wang To: CC: Greg Kroah-Hartman , "David S. Miller" , Pablo Neira Ayuso , "Stephen Hemminger" , Johannes Berg , "John W. Linville" , Stanislaw Gruszka , Johannes Berg , Francois Romieu , "Ben Hutchings" , Chas Williams , Marc Kleine-Budde , Samuel Ortiz , Paul Mackerras , Oliver Neukum , Konrad Rzeszutek Wilk , "Boris Ostrovsky" , David Vrabel , Rusty Russell , "Michael S. Tsirkin" , , , , Subject: [PATCH 12/18] net: irda: use wrapper functions of net_ratelimit() to simplify code Date: Tue, 15 Oct 2013 19:45:08 +0800 Message-ID: <1381837514-50660-13-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.msysgit.0 In-Reply-To: <1381837514-50660-1-git-send-email-wangkefeng.wang@huawei.com> References: <1381837514-50660-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.135.68.221] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org net_ratelimited_function() is called to simplify code. Signed-off-by: Kefeng Wang --- drivers/net/irda/stir4200.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 876e709..d499b2b 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c @@ -783,8 +783,7 @@ static int stir_transmit_thread(void *arg) break; if (unlikely(receive_start(stir))) { - if (net_ratelimit()) - dev_info(&dev->dev, + net_ratelimited_function(dev_info, &dev->dev, "%s: receive usb submit failed\n", stir->netdev->name); stir->receiving = 0;