lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 01 Sep 2016 22:29:46 -0700
From:   Joe Perches <joe@...ches.com>
To:     Anson Jacob <ansonjacob.aj@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Kernel List <linux-kernel@...r.kernel.org>,
        Staging List <devel@...verdev.osuosl.org>
Subject: Re: [PATCH] staging: i4l: act2000: Add blank line after declaration

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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ