[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1476023280-8614-1-git-send-email-harman4linux@gmail.com>
Date: Sun, 9 Oct 2016 19:58:00 +0530
From: Harman Kalra <harman4linux@...il.com>
To: gregkh@...uxfoundation.org, sudipm.mukherjee@...il.com
Cc: bankarsandhya512@...il.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Harman Kalra <harman4linux@...il.com>
Subject: [PATCH] Staging: i4l: act2000: Fixed warning "use pr_* instead of printk"
This patch replaces calls to the "printk" with appropriate "pr_*"
function thus addressing the following warning generated by the
checkpatch script:
Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then
dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
Signed-off-by: Harman Kalra <harman4linux@...il.com>
---
drivers/staging/i4l/act2000/act2000_isa.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
index ad7a039..1a91b52 100644
--- a/drivers/staging/i4l/act2000/act2000_isa.c
+++ b/drivers/staging/i4l/act2000/act2000_isa.c
@@ -78,10 +78,10 @@
if (istatus & ISA_ISR_ERR) {
/* Error Interrupt */
istatus &= ISA_ISR_ERR_MASK;
- printk(KERN_WARNING "act2000: errIRQ\n");
+ pr_warn("act2000: errIRQ\n");
}
if (istatus)
- printk(KERN_DEBUG "act2000: ?IRQ %d %02x\n", card->irq, istatus);
+ pr_warn("act2000: ?IRQ %d %02x\n", card->irq, istatus);
return IRQ_HANDLED;
}
@@ -147,8 +147,7 @@
if (request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) {
card->irq = old_irq;
card->flags |= ACT2000_FLAGS_IVALID;
- printk(KERN_WARNING
- "act2000: Could not request irq %d\n", irq);
+ pr_warn("act2000: Could not request irq %d\n", irq);
return -EBUSY;
} else {
act2000_isa_select_irq(card);
@@ -246,8 +245,7 @@
card->idat.isa.rcvskb = dev_alloc_skb(card->idat.isa.rcvlen);
if (!card->idat.isa.rcvskb) {
card->idat.isa.rcvignore = 1;
- printk(KERN_WARNING
- "act2000_isa_receive: no memory\n");
+ pr_warn("act2000_isa_receive: no memory\n");
test_and_clear_bit(ACT2000_LOCK_RX, (void *)&card->ilock);
return;
}
@@ -255,13 +253,12 @@
card->idat.isa.rcvptr = skb_put(card->idat.isa.rcvskb, card->idat.isa.rcvlen - 8);
} else {
card->idat.isa.rcvidx = 0;
- printk(KERN_WARNING
- "act2000_isa_receive: Invalid CAPI msg\n");
+ pr_warn("act2000_isa_receive: Invalid CAPI msg\n");
{
int i; __u8 *p; __u8 *t; __u8 tmp[30];
for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, t = tmp; i < 8; i++)
t += sprintf(t, "%02x ", *(p++));
- printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp);
+ pr_warn("act2000_isa_receive: %s\n", tmp);
}
}
}
@@ -370,13 +367,13 @@
count++;
}
if (count <= 20) {
- printk(KERN_WARNING "act2000: No Firmware-ID!\n");
+ pr_warn("act2000: No Firmware-ID!\n");
return -ETIME;
}
*p = '\0';
fid.revlen[0] = '\0';
if (strcmp(fid.isdn, "ISDN")) {
- printk(KERN_WARNING "act2000: Wrong Firmware-ID!\n");
+ pr_warn("act2000: Wrong Firmware-ID!\n");
return -EPROTO;
}
p = strchr(fid.revision, '\n');
@@ -384,7 +381,7 @@
*p = '\0';
printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision);
if (card->flags & ACT2000_FLAGS_IVALID) {
- printk(KERN_DEBUG "Enabling Interrupts ...\n");
+ pr_debug("Enabling Interrupts ...\n");
act2000_isa_enable_irq(card);
}
return 0;
@@ -426,7 +423,7 @@
}
while (c < l) {
if (act2000_isa_writeb(card, *b++)) {
- printk(KERN_WARNING
+ pr_warn(
"act2000: loader timed out"
" len=%d c=%d\n", length, c);
kfree(buf);
--
1.7.9.5
Powered by blists - more mailing lists