staging: i4l: act2000: Fix multiple checkpatch warnings
v2 cover staging: i4l: act2000: Fix multiple checkpatch warnings
This patchset fixes multiple checkpatch.pl warnings.
sayli karnik (3):
staging: i4l: act2000: Replace printk(KERN_WARNING..) with
netdev_warn(dev, ..)
staging: i4l: act2000: Add a blank line after declarations
staging: i4l: act2000: Replace printk(KERN_DEBUG..) with
netdev_dbg(dev, ..)Changes in v2:
Rebased so that patches apply to the staging tree
drivers/staging/i4l/act2000/act2000_isa.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/3 staging: i4l: act2000: Replace printk(KERN_WARNING..) with netdev_warn(dev, ..)
This patch fixes the checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ...
---
Changes in v2: Rebased so that patch applies to the staging tree
drivers/staging/i4l/act2000/act2000_isa.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
drivers/staging/i4l/act2000/act2000_isa.c +10 -13
@@ -78,7 +78,7 @@ act2000_isa_interrupt(int dummy, void *dev_id)if (istatus &ISA_ISR_ERR ) {/* Error Interrupt */ istatus &=ISA_ISR_ERR_MASK ; -printk (KERN_WARNING "act2000: errIRQ\n" ); +netdev_warn (dev,"act2000: errIRQ\n" ); }if (istatus)printk (KERN_DEBUG "act2000: ?IRQ %d %02x\n" , card->irq, istatus);
@@ -147,8 +147,7 @@ act2000_isa_config_irq(act2000_card *card, short irq)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); +netdev_warn (dev,"act2000: Could not request irq %d\n" , irq);return -EBUSY ; }else {act2000_isa_select_irq (card);
@@ -246,8 +245,7 @@ act2000_isa_receive(act2000_card *card) 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" ); +netdev_warn (dev,"act2000_isa_receive: no memory\n" );test_and_clear_bit (ACT2000_LOCK_RX , (void *)&card->ilock);return ; }
@@ -255,13 +253,12 @@ act2000_isa_receive(act2000_card *card) 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" ); +netdev_warn (dev,"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); +netdev_warn (dev,"act2000_isa_receive: %s\n" , tmp); } } }
@@ -370,13 +367,13 @@ act2000_isa_getid(act2000_card *card) count++; }if (count <=20 ) { -printk (KERN_WARNING "act2000: No Firmware-ID!\n" ); +netdev_warn (dev,"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" ); +netdev_warn (dev,"act2000: Wrong Firmware-ID!\n" );return -EPROTO ; } p =strchr (fid.revision,'\n' );
@@ -426,9 +423,9 @@ act2000_isa_download(act2000_card *card, act2000_ddef __user *cb) }while (c < l) {if (act2000_isa_writeb (card, *b++)) { -printk (KERN_WARNING -"act2000: loader timed out" -" len=%d c=%d\n" , length, c); +netdev_warn (dev, +"act2000: loader timed out" +" len=%d c=%d\n" , length, c);kfree (buf);return -ETIME ; }
Signature · 1 line
2.7.4
PATCH v2 2/3 staging: i4l: act2000: Add a blank line after declarations
In reply to sayli karnikThis patch fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
---
Changes in v2: Rebased so that patch applies to the staging tree.
drivers/staging/i4l/act2000/act2000_isa.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/i4l/act2000/act2000_isa.c +1 -0
@@ -256,6 +256,7 @@ act2000_isa_receive(act2000_card *card)netdev_warn (dev,"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++));netdev_warn (dev,"act2000_isa_receive: %s\n" , tmp);
Signature · 1 line
2.7.4
PATCH v2 3/3 staging: i4l: act2000: Replace printk(KERN_DEBUG..) with netdev_dbg(dev, ..)
In reply to sayli karnikThis patch fixes the checkpatch warning:
WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_dbg(... to printk(KERN_DEBUG ...
---
Changes in v2: This patch was newly added in the patchset.
drivers/staging/i4l/act2000/act2000_isa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/i4l/act2000/act2000_isa.c +2 -2
@@ -81,7 +81,7 @@ act2000_isa_interrupt(int dummy, void *dev_id)netdev_warn (dev,"act2000: errIRQ\n" ); }if (istatus) -printk (KERN_DEBUG "act2000: ?IRQ %d %02x\n" , card->irq, istatus); +netdev_warn (dev,"act2000: ?IRQ %d %02x\n" , card->irq, istatus);return IRQ_HANDLED ; }
@@ -382,7 +382,7 @@ act2000_isa_getid(act2000_card *card) *p ='\0' ;printk (KERN_INFO "act2000: Firmware-ID: %s\n" , fid.revision);if (card->flags &ACT2000_FLAGS_IVALID ) { -printk (KERN_DEBUG "Enabling Interrupts ...\n" ); +netdev_dbg (dev,"Enabling Interrupts ...\n" );act2000_isa_enable_irq (card); }return 0 ;
Signature · 1 line
2.7.4