All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Anson Jacob <ansonjacob.aj@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kernel List <linux-kernel@vger.kernel.org>,
	Staging List <devel@driverdev.osuosl.org>
Subject: Re: [PATCH] staging: i4l: act2000: Add blank line after declaration
Date: Thu, 01 Sep 2016 22:29:46 -0700	[thread overview]
Message-ID: <1472794186.4176.160.camel@perches.com> (raw)
In-Reply-To: <20160902050959.GA29135@ubuntu>

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

      reply	other threads:[~2016-09-02  5:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  5:09 [PATCH] staging: i4l: act2000: Add blank line after declaration Anson Jacob
2016-09-02  5:29 ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472794186.4176.160.camel@perches.com \
    --to=joe@perches.com \
    --cc=ansonjacob.aj@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.