Re: [PATCH] staging: i4l: act2000: Add blank line after declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2016-09-02 at 01:09 -0400, Anson Jacob wrote:
> Fix checkpatch.pl warning:
> Missing a blank line after declarations
[]
> diff --git a/drivers/staging/i4l/act2000/act2000_isa.c b/drivers/staging/i4l/act2000/act2000_isa.c
[]
> @@ -259,6 +259,7 @@ act2000_isa_receive(act2000_card *card)
>  					       "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);

It'd be better to use the %*ph vsprintf extension
(see Documentation/printk-formats.txt) without
any of the loop code and variable declarations:

						pr_warn("%s: %8ph\n",
							__func__, card->idat.isa.rcvhdr);
or maybe
						pr_warn("%s: %*ph\n",
							__func__,
							(int)ARRAY_SIZE(card->idat.isa.rcvhdr),
							card->idat.isa.rcvhdr);

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux