From: Veaceslav Falico Date: Wed, 25 Sep 2013 07:20:27 +0000 (+0200) Subject: bonding: use neighbours for bond_next_slave() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=344f3297629e409675120998d1cfe4d21c34fbaa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bonding: use neighbours for bond_next_slave() Use the new function __bond_next_slave(). CC: Jay Vosburgh CC: Andy Gospodarek Signed-off-by: Veaceslav Falico Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 4a3fbe307ee8..f070557c21ea 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -76,8 +76,6 @@ #define bond_has_slaves(bond) !list_empty(bond_slave_list(bond)) -#define bond_to_slave(ptr) list_entry(ptr, struct slave, list) - /* IMPORTANT: bond_first/last_slave can return NULL in case of an empty list */ #define bond_first_slave(bond) \ (bond_has_slaves(bond) ? \ @@ -92,9 +90,7 @@ #define bond_is_last_slave(bond, pos) (pos == bond_last_slave(bond)) /* Since bond_first/last_slave can return NULL, these can return NULL too */ -#define bond_next_slave(bond, pos) \ - (bond_is_last_slave(bond, pos) ? bond_first_slave(bond) : \ - bond_to_slave((pos)->list.next)) +#define bond_next_slave(bond, pos) __bond_next_slave(bond, pos) /** * bond_for_each_slave - iterate over all slaves