All of lore.kernel.org
 help / color / mirror / Atom feed
* question about drivers/net/ethernet/jme.{c,h}
@ 2013-08-13 16:33 Julia Lawall
  2013-08-13 17:26 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2013-08-13 16:33 UTC (permalink / raw)
  To: cooldavid, netdev

I wonder what is the point of the macro NETIF_NAPI_SET?  It has only one
definition, and it just transfers its arguments directly to the more
common function netif_napi_add.  The fact that the definition of the macro
contains a semicolon also makes the use of NETIF_NAPI_SET not look like a
normal function call.

thanks,
julia

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question about drivers/net/ethernet/jme.{c,h}
  2013-08-13 16:33 question about drivers/net/ethernet/jme.{c,h} Julia Lawall
@ 2013-08-13 17:26 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2013-08-13 17:26 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cooldavid, netdev

On Tue, 2013-08-13 at 18:33 +0200, Julia Lawall wrote:
> I wonder what is the point of the macro NETIF_NAPI_SET?

Today it seems pretty clear it's useless indirection.

It might have been useful sometime before the jme.c
file was first submitted, but now it should be removed.

In the jme.h file on JMicron's website, the driver
still supports linux versions less than 2.6.23 and
uses a form like this:

ftp://driver.jmicron.com.tw/Ethernet/Linux/jmebp-1.0.8.5.tar.bz

#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
#define NETIF_NAPI_SET(dev, napis, pollfn, q) \
	dev->poll = pollfn; \
	dev->weight = q;
#else
#define NETIF_NAPI_SET(dev, napis, pollfn, q) \
	netif_napi_add(dev, napis, pollfn, q);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-13 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-13 16:33 question about drivers/net/ethernet/jme.{c,h} Julia Lawall
2013-08-13 17:26 ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.