All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jamal Shareef <jamal.k.shareef@gmail.com>
Cc: boqun.feng@microsoft.com, andrea.parri@microsoft.com,
	vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
	elder@kernel.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging: greybus: Fix quote string split across lines
Date: Tue, 15 Oct 2019 06:09:38 +0200	[thread overview]
Message-ID: <20191015040938.GC804807@kroah.com> (raw)
In-Reply-To: <20191014205529.919-1-jamal.k.shareef@gmail.com>

On Mon, Oct 14, 2019 at 01:55:29PM -0700, Jamal Shareef wrote:
> Fix quoted string split across multiple lines.
> Issue found by checkpatch.
> 
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  drivers/staging/greybus/audio_manager_sysfs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
> index ab882cc49b41..54b0caf22b5a 100644
> --- a/drivers/staging/greybus/audio_manager_sysfs.c
> +++ b/drivers/staging/greybus/audio_manager_sysfs.c
> @@ -17,11 +17,11 @@ static ssize_t manager_sysfs_add_store(struct kobject *kobj,
>  {
>  	struct gb_audio_manager_module_descriptor desc = { {0} };
>  
> -	int num = sscanf(buf,
> -			"name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF "s "
> -			"vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
> -			desc.name, &desc.vid, &desc.pid, &desc.intf_id,
> -			&desc.ip_devices, &desc.op_devices);
> +	int num =
> +	sscanf(buf, "name=%" GB_AUDIO_MANAGER_MODULE_NAME_LEN_SSCANF "s "

First off, this type of indent isn't ok :(

> +	       "vid=%d pid=%d intf_id=%d i/p devices=0x%X o/p devices=0x%X",
> +	       desc.name, &desc.vid, &desc.pid, &desc.intf_id,
> +	       &desc.ip_devices, &desc.op_devices);

Secondly, as Julia points out, you didn't actually change anything here
with regards to the string.

As the code is, it looks about as good as it can get, I would just leave
this as-is.

thanks,

greg k-h


      parent reply	other threads:[~2019-10-15  4:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 20:55 [PATCH] staging: greybus: Fix quote string split across lines Jamal Shareef
2019-10-14 21:10 ` [Outreachy kernel] " Julia Lawall
2019-10-15  3:24   ` Jamal Shareef
2019-10-15  4:09 ` Greg KH [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=20191015040938.GC804807@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andrea.parri@microsoft.com \
    --cc=boqun.feng@microsoft.com \
    --cc=elder@kernel.org \
    --cc=jamal.k.shareef@gmail.com \
    --cc=johan@kernel.org \
    --cc=mgreer@animalcreek.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=vaibhav.sr@gmail.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.