Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib8390: Use netif_msg_init to initialize msg_enable bits

Use netif_msg_init() to process param settings
and use only the proper initialized value of
ei_local->msg_level for later processing;

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Armin Wolf and committed by
David S. Miller
360f8987 7a333af6

+8 -6
+8 -6
drivers/net/ethernet/8390/lib8390.c
··· 113 113 static void __NS8390_init(struct net_device *dev, int startp); 114 114 115 115 static unsigned version_printed; 116 - static u32 msg_enable; 117 - module_param(msg_enable, uint, 0444); 116 + static int msg_enable; 117 + static const int default_msg_level = (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_RX_ERR | 118 + NETIF_MSG_TX_ERR); 119 + module_param(msg_enable, int, 0444); 118 120 MODULE_PARM_DESC(msg_enable, "Debug message level (see linux/netdevice.h for bitmap)"); 119 121 120 122 /* ··· 976 974 { 977 975 struct ei_device *ei_local = netdev_priv(dev); 978 976 979 - if ((msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0)) 980 - pr_info("%s", version); 981 - 982 977 ether_setup(dev); 983 978 984 979 spin_lock_init(&ei_local->page_lock); 985 980 986 - ei_local->msg_enable = msg_enable; 981 + ei_local->msg_enable = netif_msg_init(msg_enable, default_msg_level); 982 + 983 + if (netif_msg_drv(ei_local) && (version_printed++ == 0)) 984 + pr_info("%s", version); 987 985 } 988 986 989 987 /**