From 51d864774c20dab03f403c05878cc2c5ed3ff656 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Wed, 12 Sep 2007 14:57:09 +0200 Subject: [PATCH] --- yaml --- r: 66401 b: refs/heads/master c: a050c33f4a4d5babaf94a8ba6ae7a200135240b3 h: refs/heads/master i: 66399: 06f34e467b926f58edaab74d4a2b36d6740af75b v: v3 --- [refs] | 2 +- trunk/include/linux/netdevice.h | 35 ++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index b63a6c9cd16d..78d4f473263c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: abf07acbb9f122218095d0d221e0f949160ccc37 +refs/heads/master: a050c33f4a4d5babaf94a8ba6ae7a200135240b3 diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h index 407658c64fb6..625240ce27f1 100644 --- a/trunk/include/linux/netdevice.h +++ b/trunk/include/linux/netdevice.h @@ -41,7 +41,8 @@ #include #include -struct net; +#include + struct vlan_group; struct ethtool_ops; struct netpoll_info; @@ -753,23 +754,21 @@ extern rwlock_t dev_base_lock; /* Device list lock */ list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list) #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list) -#define next_net_device(d) \ -({ \ - struct net_device *dev = d; \ - struct list_head *lh; \ - struct net *net; \ - \ - net = dev->nd_net; \ - lh = dev->dev_list.next; \ - lh == &net->dev_base_head ? NULL : net_device_entry(lh); \ -}) - -#define first_net_device(N) \ -({ \ - struct net *NET = (N); \ - list_empty(&NET->dev_base_head) ? NULL : \ - net_device_entry(NET->dev_base_head.next); \ -}) +static inline struct net_device *next_net_device(struct net_device *dev) +{ + struct list_head *lh; + struct net *net; + + net = dev->nd_net; + lh = dev->dev_list.next; + return lh == &net->dev_base_head ? NULL : net_device_entry(lh); +} + +static inline struct net_device *first_net_device(struct net *net) +{ + return list_empty(&net->dev_base_head) ? NULL : + net_device_entry(net->dev_base_head.next); +} extern int netdev_boot_setup_check(struct net_device *dev); extern unsigned long netdev_boot_base(const char *prefix, int unit);