lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  9 Feb 2010 13:49:46 -0800
From:	Joe Perches <>
To:	David Miller <>
Cc:, Ben Hutchings <>
Subject: [RFC PATCH net-next 0/7] Add netdev_printk and netif_printk macros

Some logging messages duplicate the driver name with the device name like:

ATL1E 0000:03:00.0: ATL1E: eth0 NIC Link is Up<100 Mbps Full Duplex>
Some drivers/net/... have created netif_ macros like:

drivers/net/sis190.c:#define net_drv(p, arg...)		if (netif_msg_drv(p)) \
drivers/net/sis190.c-					printk(arg)
drivers/net/sis190.c:#define net_probe(p, arg...)	if (netif_msg_probe(p)) \
drivers/net/sis190.c-					printk(arg)
drivers/net/sis190.c:#define net_link(p, arg...)	if (netif_msg_link(p)) \
drivers/net/sis190.c-					printk(arg)
drivers/net/sis190.c:#define net_intr(p, arg...)	if (netif_msg_intr(p)) \
drivers/net/sis190.c-					printk(arg)
drivers/net/sis190.c:#define net_tx_err(p, arg...)	if (netif_msg_tx_err(p)) \
drivers/net/sis190.c-					printk(arg)

This RFC patch creates a set of these macros to standardize
the coding and logging style of struct net_device and netif_msg macros

I think they're useful, might be mindless churn to others.

The atl1e change reduces log duplicate names.

The qlge change is an example of what be mindless churn for standardization
sake, the r8169, jme, and skge are more reasonable.


Joe Perches (7):
  netdevice.h: Add netdev_printk helpers like dev_printk
  drivers/net/atl1e: Use netdev_printk helpers
  include/linux/netdevice.h: Add netif_printk helpers
  drivers/net/r8196.c: Use netif_printk macros
  drivers/net/jme: Use netif_printk helpers
  drivers/net/qlge: Use netif_printk helpers
  drivers/net/skge.c: Use netif_printk macros

 drivers/net/atl1e/atl1e_hw.c    |   23 +-
 drivers/net/atl1e/atl1e_main.c  |  153 ++++----
 drivers/net/atl1e/atl1e_param.c |   35 +-
 drivers/net/jme.c               |   54 ++--
 drivers/net/jme.h               |   41 +--
 drivers/net/qlge/qlge.h         |    8 -
 drivers/net/qlge/qlge_dbg.c     |   58 ++--
 drivers/net/qlge/qlge_ethtool.c |   49 ++-
 drivers/net/qlge/qlge_main.c    |  841 ++++++++++++++++++++-------------------
 drivers/net/qlge/qlge_mpi.c     |  183 ++++-----
 drivers/net/r8169.c             |  136 +++----
 drivers/net/skge.c              |   73 ++--
 include/linux/netdevice.h       |  124 ++++++
 13 files changed, 914 insertions(+), 864 deletions(-)

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists