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

arcnet: rimi: Fix device name in debug output

arcrimi_probe() calls BUGMSG() before register_netdev() happens. BUGMSG()
itself prints dev->name, but as the format string hasn't been expanded by
register_netdev() yet, the output contains bogus device name such as

arc%d: Given: node 00h, shmem 0h, irq 0

As we don't know the device name yet, just drop the prefix completely from
the debugging messages.

Reported-by: Steven Young <sdyoung@vt220.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Kosina and committed by
David S. Miller
b95465c8 890fdf2a

+4 -4
+4 -4
drivers/net/arcnet/arc-rimi.c
··· 89 89 BUGLVL(D_NORMAL) printk(VERSION); 90 90 BUGLVL(D_NORMAL) printk("E-mail me if you actually test the RIM I driver, please!\n"); 91 91 92 - BUGMSG(D_NORMAL, "Given: node %02Xh, shmem %lXh, irq %d\n", 92 + BUGLVL(D_NORMAL) printk("Given: node %02Xh, shmem %lXh, irq %d\n", 93 93 dev->dev_addr[0], dev->mem_start, dev->irq); 94 94 95 95 if (dev->mem_start <= 0 || dev->irq <= 0) { 96 - BUGMSG(D_NORMAL, "No autoprobe for RIM I; you " 96 + BUGLVL(D_NORMAL) printk("No autoprobe for RIM I; you " 97 97 "must specify the shmem and irq!\n"); 98 98 return -ENODEV; 99 99 } 100 100 if (dev->dev_addr[0] == 0) { 101 - BUGMSG(D_NORMAL, "You need to specify your card's station " 101 + BUGLVL(D_NORMAL) printk("You need to specify your card's station " 102 102 "ID!\n"); 103 103 return -ENODEV; 104 104 } ··· 109 109 * will be taken. 110 110 */ 111 111 if (!request_mem_region(dev->mem_start, MIRROR_SIZE, "arcnet (90xx)")) { 112 - BUGMSG(D_NORMAL, "Card memory already allocated\n"); 112 + BUGLVL(D_NORMAL) printk("Card memory already allocated\n"); 113 113 return -ENODEV; 114 114 } 115 115 return arcrimi_found(dev);