Commit d533ed8d authored by Joe Perches's avatar Joe Perches Committed by james toy

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Convert printks to pr_<level>
Convert some embedded function names to %s...__func__
Remove a period after exclamation points.
Remove #define pr_dbg which could be used by future kernel.h includes
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent c6a13c3d
...@@ -113,6 +113,8 @@ ...@@ -113,6 +113,8 @@
* 64-bit verification * 64-bit verification
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/firmware.h> #include <linux/firmware.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -140,7 +142,6 @@ ...@@ -140,7 +142,6 @@
#define InterruptTheCard(base) outw(0, (base) + 0xc) #define InterruptTheCard(base) outw(0, (base) + 0xc)
#define ClearInterrupt(base) inw((base) + 0x0a) #define ClearInterrupt(base) inw((base) + 0x0a)
#define pr_dbg(str...) pr_debug("ISICOM: " str)
#ifdef DEBUG #ifdef DEBUG
#define isicom_paranoia_check(a, b, c) __isicom_paranoia_check((a), (b), (c)) #define isicom_paranoia_check(a, b, c) __isicom_paranoia_check((a), (b), (c))
#else #else
...@@ -249,8 +250,7 @@ static int lock_card(struct isi_board *card) ...@@ -249,8 +250,7 @@ static int lock_card(struct isi_board *card)
spin_unlock_irqrestore(&card->card_lock, card->flags); spin_unlock_irqrestore(&card->card_lock, card->flags);
msleep(10); msleep(10);
} }
printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", pr_warning("Failed to lock Card (0x%lx)\n", card->base);
card->base);
return 0; /* Failed to acquire the card! */ return 0; /* Failed to acquire the card! */
} }
...@@ -379,13 +379,13 @@ static inline int __isicom_paranoia_check(struct isi_port const *port, ...@@ -379,13 +379,13 @@ static inline int __isicom_paranoia_check(struct isi_port const *port,
char *name, const char *routine) char *name, const char *routine)
{ {
if (!port) { if (!port) {
printk(KERN_WARNING "ISICOM: Warning: bad isicom magic for " pr_warning("Warning: bad isicom magic for dev %s in %s.\n",
"dev %s in %s.\n", name, routine); name, routine);
return 1; return 1;
} }
if (port->magic != ISICOM_MAGIC) { if (port->magic != ISICOM_MAGIC) {
printk(KERN_WARNING "ISICOM: Warning: NULL isicom port for " pr_warning("Warning: NULL isicom port for dev %s in %s.\n",
"dev %s in %s.\n", name, routine); name, routine);
return 1; return 1;
} }
...@@ -450,8 +450,8 @@ static void isicom_tx(unsigned long _data) ...@@ -450,8 +450,8 @@ static void isicom_tx(unsigned long _data)
if (!(inw(base + 0x02) & (1 << port->channel))) if (!(inw(base + 0x02) & (1 << port->channel)))
continue; continue;
pr_dbg("txing %d bytes, port%d.\n", txcount, pr_debug("txing %d bytes, port%d.\n",
port->channel + 1); txcount, port->channel + 1);
outw((port->channel << isi_card[card].shift_count) | txcount, outw((port->channel << isi_card[card].shift_count) | txcount,
base); base);
residue = NO; residue = NO;
...@@ -547,8 +547,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -547,8 +547,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
byte_count = header & 0xff; byte_count = header & 0xff;
if (channel + 1 > card->port_count) { if (channel + 1 > card->port_count) {
printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): " pr_warning("%s(0x%lx): %d(channel) > port_count.\n",
"%d(channel) > port_count.\n", base, channel+1); __func__, base, channel+1);
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
spin_unlock(&card->card_lock); spin_unlock(&card->card_lock);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -582,14 +582,15 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -582,14 +582,15 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
if (port->status & ISI_DCD) { if (port->status & ISI_DCD) {
if (!(header & ISI_DCD)) { if (!(header & ISI_DCD)) {
/* Carrier has been lost */ /* Carrier has been lost */
pr_dbg("interrupt: DCD->low.\n" pr_debug("%s: DCD->low.\n",
); __func__);
port->status &= ~ISI_DCD; port->status &= ~ISI_DCD;
tty_hangup(tty); tty_hangup(tty);
} }
} else if (header & ISI_DCD) { } else if (header & ISI_DCD) {
/* Carrier has been detected */ /* Carrier has been detected */
pr_dbg("interrupt: DCD->high.\n"); pr_debug("%s: DCD->high.\n",
__func__);
port->status |= ISI_DCD; port->status |= ISI_DCD;
wake_up_interruptible(&port->port.open_wait); wake_up_interruptible(&port->port.open_wait);
} }
...@@ -641,17 +642,19 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -641,17 +642,19 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
break; break;
case 2: /* Statistics */ case 2: /* Statistics */
pr_dbg("isicom_interrupt: stats!!!.\n"); pr_debug("%s: stats!!!\n", __func__);
break; break;
default: default:
pr_dbg("Intr: Unknown code in status packet.\n"); pr_debug("%s: Unknown code in status packet.\n",
__func__);
break; break;
} }
} else { /* Data Packet */ } else { /* Data Packet */
count = tty_prepare_flip_string(tty, &rp, byte_count & ~1); count = tty_prepare_flip_string(tty, &rp, byte_count & ~1);
pr_dbg("Intr: Can rx %d of %d bytes.\n", count, byte_count); pr_debug("%s: Can rx %d of %d bytes.\n",
__func__, count, byte_count);
word_count = count >> 1; word_count = count >> 1;
insw(base, rp, word_count); insw(base, rp, word_count);
byte_count -= (word_count << 1); byte_count -= (word_count << 1);
...@@ -661,8 +664,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -661,8 +664,8 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
byte_count -= 2; byte_count -= 2;
} }
if (byte_count > 0) { if (byte_count > 0) {
pr_dbg("Intr(0x%lx:%d): Flip buffer overflow! dropping " pr_debug("%s(0x%lx:%d): Flip buffer overflow! dropping bytes...\n",
"bytes...\n", base, channel + 1); __func__, base, channel + 1);
/* drain out unread xtra data */ /* drain out unread xtra data */
while (byte_count > 0) { while (byte_count > 0) {
inw(base); inw(base);
...@@ -939,8 +942,8 @@ static void isicom_shutdown_port(struct isi_port *port) ...@@ -939,8 +942,8 @@ static void isicom_shutdown_port(struct isi_port *port)
set_bit(TTY_IO_ERROR, &tty->flags); set_bit(TTY_IO_ERROR, &tty->flags);
if (--card->count < 0) { if (--card->count < 0) {
pr_dbg("isicom_shutdown_port: bad board(0x%lx) count %d.\n", pr_debug("%s: bad board(0x%lx) count %d.\n",
card->base, card->count); __func__, card->base, card->count);
card->count = 0; card->count = 0;
} }
...@@ -1746,13 +1749,13 @@ static int __init isicom_init(void) ...@@ -1746,13 +1749,13 @@ static int __init isicom_init(void)
retval = tty_register_driver(isicom_normal); retval = tty_register_driver(isicom_normal);
if (retval) { if (retval) {
pr_dbg("Couldn't register the dialin driver\n"); pr_debug("Couldn't register the dialin driver\n");
goto err_puttty; goto err_puttty;
} }
retval = pci_register_driver(&isicom_driver); retval = pci_register_driver(&isicom_driver);
if (retval < 0) { if (retval < 0) {
printk(KERN_ERR "ISICOM: Unable to register pci driver.\n"); pr_err("Unable to register pci driver.\n");
goto err_unrtty; goto err_unrtty;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment