From patchwork Tue Oct 15 11:45:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 283599 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 4B4F52C0143 for ; Tue, 15 Oct 2013 23:00:43 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758208Ab3JOL6m (ORCPT ); Tue, 15 Oct 2013 07:58:42 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:5530 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932408Ab3JOL6g (ORCPT ); Tue, 15 Oct 2013 07:58:36 -0400 Received: from 172.24.2.119 (EHLO szxeml213-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BKI15911; Tue, 15 Oct 2013 19:58:00 +0800 (CST) Received: from SZXEML417-HUB.china.huawei.com (10.82.67.156) by szxeml213-edg.china.huawei.com (172.24.2.30) with Microsoft SMTP Server (TLS) id 14.3.146.0; Tue, 15 Oct 2013 19:58:00 +0800 Received: from localhost (10.135.68.221) by szxeml417-hub.china.huawei.com (10.82.67.156) with Microsoft SMTP Server id 14.3.146.0; Tue, 15 Oct 2013 19:57:50 +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 17/18] net: vxlan: use wrapper functions of net_ratelimit() to simplify code Date: Tue, 15 Oct 2013 19:45:13 +0800 Message-ID: <1381837514-50660-18-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/vxlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 2ef5b62..56583ab 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -893,8 +893,7 @@ static bool vxlan_snoop(struct net_device *dev, if (f->state & NUD_NOARP) return true; - if (net_ratelimit()) - netdev_info(dev, + net_ratelimited_function(netdev_info, dev, "%pM migrated from %pIS to %pIS\n", src_mac, &rdst->remote_ip, &src_ip);