[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201107122111.56365.arnd@arndb.de>
Date: Tue, 12 Jul 2011 21:11:56 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Randy Dunlap <rdunlap@...otime.net>
Cc: Stephen Hemminger <shemminger@...tta.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: netdevice: Kill 'feature' test macros.
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists