* netdevice: Kill 'feature' test macros.
@ 2011-07-12 17:50 David Miller
2011-07-12 18:10 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2011-07-12 17:50 UTC (permalink / raw)
To: netdev
Almost all of these have long outstayed their welcome.
And for every one of these macros, there are 10 features for which we
didn't get macros added.
Let's just delete them all, and get out of habit of doing things this
way.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/linux/netdevice.h | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 011eb89..30f17e4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -60,11 +60,6 @@ struct wireless_dev;
#define SET_ETHTOOL_OPS(netdev,ops) \
( (netdev)->ethtool_ops = (ops) )
-#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
- functions are available. */
-#define HAVE_FREE_NETDEV /* free_netdev() */
-#define HAVE_NETDEV_PRIV /* netdev_priv() */
-
/* hardware address assignment types */
#define NET_ADDR_PERM 0 /* address is permanent (default) */
#define NET_ADDR_RANDOM 1 /* address is generated randomly */
@@ -313,7 +308,6 @@ struct header_ops {
const void *saddr, unsigned len);
int (*parse)(const struct sk_buff *skb, unsigned char *haddr);
int (*rebuild)(struct sk_buff *skb);
-#define HAVE_HEADER_CACHE
int (*cache)(const struct neighbour *neigh, struct hh_cache *hh);
void (*cache_update)(struct hh_cache *hh,
const struct net_device *dev,
@@ -887,7 +881,6 @@ struct netdev_tc_txq {
* Must return >0 or -errno if it changed dev->features itself.
*
*/
-#define HAVE_NET_DEVICE_OPS
struct net_device_ops {
int (*ndo_init)(struct net_device *dev);
void (*ndo_uninit)(struct net_device *dev);
@@ -1781,8 +1774,6 @@ static inline void input_queue_tail_incr_save(struct softnet_data *sd,
DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
-#define HAVE_NETIF_QUEUE
-
extern void __netif_schedule(struct Qdisc *q);
static inline void netif_schedule_queue(struct netdev_queue *txq)
@@ -2058,10 +2049,8 @@ extern void dev_kfree_skb_irq(struct sk_buff *skb);
*/
extern void dev_kfree_skb_any(struct sk_buff *skb);
-#define HAVE_NETIF_RX 1
extern int netif_rx(struct sk_buff *skb);
extern int netif_rx_ni(struct sk_buff *skb);
-#define HAVE_NETIF_RECEIVE_SKB 1
extern int netif_receive_skb(struct sk_buff *skb);
extern gro_result_t dev_gro_receive(struct napi_struct *napi,
struct sk_buff *skb);
@@ -2241,7 +2230,6 @@ extern void netif_device_attach(struct net_device *dev);
/*
* Network interface message level settings
*/
-#define HAVE_NETIF_MSG 1
enum {
NETIF_MSG_DRV = 0x0001,
--
1.7.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: netdevice: Kill 'feature' test macros.
2011-07-12 17:50 netdevice: Kill 'feature' test macros David Miller
@ 2011-07-12 18:10 ` Stephen Hemminger
2011-07-12 19:06 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2011-07-12 18:10 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Tue, 12 Jul 2011 10:50:05 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
>
> Almost all of these have long outstayed their welcome.
>
> And for every one of these macros, there are 10 features for which we
> didn't get macros added.
>
> Let's just delete them all, and get out of habit of doing things this
> way.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
This is sure to break out of tree drivers...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: netdevice: Kill 'feature' test macros.
2011-07-12 18:10 ` Stephen Hemminger
@ 2011-07-12 19:06 ` Arnd Bergmann
2011-07-12 19:09 ` Randy Dunlap
2011-07-12 19:18 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2011-07-12 19:06 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
On Tuesday 12 July 2011 20:10:33 Stephen Hemminger wrote:
> On Tue, 12 Jul 2011 10:50:05 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
>
> >
> > Almost all of these have long outstayed their welcome.
> >
> > And for every one of these macros, there are 10 features for which we
> > didn't get macros added.
> >
> > Let's just delete them all, and get out of habit of doing things this
> > way.
> >
> > Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
>
> This is sure to break out of tree drivers...
I guess that's a good thing, but it also breaks these:
drivers/staging/wlags49_h2/wl_internal.h:#ifdef HAVE_NETDEV_PRIV
drivers/net/cxgb4vf/cxgb4vf_main.c:#ifdef HAVE_NET_DEVICE_OPS
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:#ifdef HAVE_NET_DEVICE_OPS
net/batman-adv/soft-interface.c:#ifdef HAVE_NET_DEVICE_OPS
Acked-by: Arnd Bergmann <arnd@arndb.de>
if the above are taken care of.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: netdevice: Kill 'feature' test macros.
2011-07-12 19:06 ` Arnd Bergmann
@ 2011-07-12 19:09 ` Randy Dunlap
2011-07-12 19:11 ` Arnd Bergmann
2011-07-12 19:18 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2011-07-12 19:09 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Stephen Hemminger, David Miller, netdev
On Tue, 12 Jul 2011 21:06:21 +0200 Arnd Bergmann wrote:
> On Tuesday 12 July 2011 20:10:33 Stephen Hemminger wrote:
> > On Tue, 12 Jul 2011 10:50:05 -0700 (PDT)
> > David Miller <davem@davemloft.net> wrote:
> >
> > >
> > > Almost all of these have long outstayed their welcome.
> > >
> > > And for every one of these macros, there are 10 features for which we
> > > didn't get macros added.
> > >
> > > Let's just delete them all, and get out of habit of doing things this
> > > way.
> > >
> > > Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> > Acked-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> > This is sure to break out of tree drivers...
>
> I guess that's a good thing, but it also breaks these:
>
> drivers/staging/wlags49_h2/wl_internal.h:#ifdef HAVE_NETDEV_PRIV
> drivers/net/cxgb4vf/cxgb4vf_main.c:#ifdef HAVE_NET_DEVICE_OPS
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:#ifdef HAVE_NET_DEVICE_OPS
> net/batman-adv/soft-interface.c:#ifdef HAVE_NET_DEVICE_OPS
Really? I thought it would only break:
#if UNKNOWN_SYMBOL
but not
#ifdef UNKNOWN_SYMBOL
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> if the above are taken care of.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: netdevice: Kill 'feature' test macros.
2011-07-12 19:09 ` Randy Dunlap
@ 2011-07-12 19:11 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2011-07-12 19:11 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Stephen Hemminger, David Miller, netdev
On Tuesday 12 July 2011 21:09:23 Randy Dunlap wrote:
> >
> > I guess that's a good thing, but it also breaks these:
> >
> > drivers/staging/wlags49_h2/wl_internal.h:#ifdef HAVE_NETDEV_PRIV
> > drivers/net/cxgb4vf/cxgb4vf_main.c:#ifdef HAVE_NET_DEVICE_OPS
> > drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:#ifdef HAVE_NET_DEVICE_OPS
> > net/batman-adv/soft-interface.c:#ifdef HAVE_NET_DEVICE_OPS
>
> Really? I thought it would only break:
>
> #if UNKNOWN_SYMBOL
> but not
> #ifdef UNKNOWN_SYMBOL
The point is that the drivers expect the symbol to be defined, e.g.
#ifdef HAVE_NETDEV_PRIV
#define wl_priv(dev) ((struct wl_private *) netdev_priv(dev))
#else
extern inline struct wl_private *wl_priv(struct net_device *dev)
{
return dev->priv;
}
#endif
With current Linux versions, the first one is correct, the second one
is wrong, and removing the symbol changes which one is used.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: netdevice: Kill 'feature' test macros.
2011-07-12 19:06 ` Arnd Bergmann
2011-07-12 19:09 ` Randy Dunlap
@ 2011-07-12 19:18 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2011-07-12 19:18 UTC (permalink / raw)
To: arnd; +Cc: shemminger, netdev
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 12 Jul 2011 21:06:21 +0200
> On Tuesday 12 July 2011 20:10:33 Stephen Hemminger wrote:
>> On Tue, 12 Jul 2011 10:50:05 -0700 (PDT)
>> David Miller <davem@davemloft.net> wrote:
>>
>> >
>> > Almost all of these have long outstayed their welcome.
>> >
>> > And for every one of these macros, there are 10 features for which we
>> > didn't get macros added.
>> >
>> > Let's just delete them all, and get out of habit of doing things this
>> > way.
>> >
>> > Signed-off-by: David S. Miller <davem@davemloft.net>
>>
>> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
>>
>> This is sure to break out of tree drivers...
>
> I guess that's a good thing, but it also breaks these:
>
> drivers/staging/wlags49_h2/wl_internal.h:#ifdef HAVE_NETDEV_PRIV
> drivers/net/cxgb4vf/cxgb4vf_main.c:#ifdef HAVE_NET_DEVICE_OPS
> drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:#ifdef HAVE_NET_DEVICE_OPS
> net/batman-adv/soft-interface.c:#ifdef HAVE_NET_DEVICE_OPS
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> if the above are taken care of.
Thanks for catching this Arnd.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-12 19:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 17:50 netdevice: Kill 'feature' test macros David Miller
2011-07-12 18:10 ` Stephen Hemminger
2011-07-12 19:06 ` Arnd Bergmann
2011-07-12 19:09 ` Randy Dunlap
2011-07-12 19:11 ` Arnd Bergmann
2011-07-12 19:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).