lkml.org 
[lkml]   [2016]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: i4l: act2000: Add blank line after declaration
From
Date
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);

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.040 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site