All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Cc: thomas.petazzoni@free-electrons.com, noralf@tronnes.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations.
Date: Wed, 1 Mar 2017 08:56:03 +0100	[thread overview]
Message-ID: <20170301075603.GA25099@kroah.com> (raw)
In-Reply-To: <20170228195244.29205-1-alexander.kapshuk@gmail.com>

On Tue, Feb 28, 2017 at 09:52:44PM +0200, Alexander Kapshuk wrote:
> Use a single fmt string with appropriate verbs as conversion specifiers,
> followed by the original string literals and the integer argument
> instead of using a backslash to escape a new line embedded inbetween
> quoted string literals passed as fmt arguments to dev_err() invoked in
> drivers/staging/fbtft/fb_ssd1331.c.
> 
> Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
> ---
>  drivers/staging/fbtft/fb_ssd1331.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c
> index 26f24e3..6d03041 100644
> --- a/drivers/staging/fbtft/fb_ssd1331.c
> +++ b/drivers/staging/fbtft/fb_ssd1331.c
> @@ -129,17 +129,19 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
>  
>  	for (i = 0; i < 63; i++) {
>  		if (i > 0 && curves[i] < 2) {
> -			dev_err(par->info->device,
> -				"Illegal value in Grayscale Lookup Table at index %d. " \
> -				"Must be greater than 1\n", i);
> +			dev_err(par->info->device, "%s %d. %s\n",
> +				"Illegal value in Grayscale Lookup Table at index",
> +				i,
> +				"Must be greater than 1");

Huh?  This should just be:
				"Illegal value in Grayscale Lookup Table at index %d. Must be greater than 1\n",
				i);
Don't split the string for no good reason.

>  			return -EINVAL;
>  		}
>  		acc += curves[i];
>  		tmp[i] = acc;
>  		if (acc > 180) {
> -			dev_err(par->info->device,
> -				"Illegal value(s) in Grayscale Lookup Table. " \
> -				"At index=%d, the accumulated value has exceeded 180\n", i);
> +			dev_err(par->info->device, "%s%d, %s\n",
> +				"Illegal value(s) in Grayscale Lookup Table. At index=",
> +				i,
> +				"the accumulated value has exceeded 180");

Same here.

please fix.

thanks,

greg k-h

  parent reply	other threads:[~2017-03-01  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 19:52 [PATCH] staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations Alexander Kapshuk
2017-02-28 20:34 ` Joe Perches
2017-02-28 21:03   ` Alexander Kapshuk
2017-03-01  7:56 ` Greg KH [this message]
2017-03-04  9:00   ` Alexander Kapshuk

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=20170301075603.GA25099@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.kapshuk@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /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.