From mboxrd@z Thu Jan 1 00:00:00 1970 From: Veaceslav Falico Subject: [PATCH v3 net-next 0/9] bonding: simple macro cleanup Date: Thu, 15 May 2014 21:39:50 +0200 Message-ID: <1400182799-22737-1-git-send-email-vfalico@gmail.com> Cc: Jay Vosburgh , Andy Gospodarek , Veaceslav Falico To: netdev@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755870AbaEOTot (ORCPT ); Thu, 15 May 2014 15:44:49 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Hi, Trivial patchset that converts most of the bonding's macros into inline functions. It introduces only one macro, BOND_MODE(), which is just bond->params.mode, better to write/understand/remember. The only real change is the removal of IFF_UP verification, which always came in pair with && netif_running(), and is though useless, as it's always IFF_UP when LINK_STATE_RUNNING. v2->v3: fix 3/9 to actually invert bond_mode_uses_arp() and add bond_uses_arp() alongside bond_mode_uses_arp() v1->v2: use inlined functions instead of macros. CC: Jay Vosburgh CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Veaceslav Falico --- drivers/net/bonding/bond_3ad.c | 6 +- drivers/net/bonding/bond_alb.c | 18 ++--- drivers/net/bonding/bond_debugfs.c | 2 +- drivers/net/bonding/bond_main.c | 143 ++++++++++++++++----------------- drivers/net/bonding/bond_netlink.c | 6 +- drivers/net/bonding/bond_options.c | 10 +-- drivers/net/bonding/bond_procfs.c | 14 ++-- drivers/net/bonding/bond_sysfs.c | 14 ++-- drivers/net/bonding/bond_sysfs_slave.c | 2 +- drivers/net/bonding/bonding.h | 89 ++++++++++---------- 10 files changed, 150 insertions(+), 154 deletions(-)