All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Gokce Kuler <gokcekuler@gmail.com>,
	outreachy-kernel@googlegroups.com, elder@kernel.org,
	johan@kernel.org, mgreer@animalcreek.com, vaibhav.sr@gmail.com
Subject: Re: [PATCH] staging: greybus: quoted string split across lines
Date: Mon, 6 Apr 2020 12:15:49 +0200	[thread overview]
Message-ID: <20200406101549.GA16292@localhost> (raw)
In-Reply-To: <20200405071517.GA1547921@kroah.com>

On Sun, Apr 05, 2020 at 09:15:17AM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 04, 2020 at 03:51:22AM +0300, Gokce Kuler wrote:
> > Quoted string merge to upper line.
> > 
> > Signed-off-by: Gokce Kuler <gokcekuler@gmail.com>
> > ---
> >  drivers/staging/greybus/audio_manager_sysfs.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
> > index ab882cc..d7216e9 100644
> > --- a/drivers/staging/greybus/audio_manager_sysfs.c
> > +++ b/drivers/staging/greybus/audio_manager_sysfs.c
> > @@ -18,8 +18,7 @@ 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",
> > +			"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",
> 
> No, try breaking this line by putting the "s " on the next line, so
> there is only quoted string there.

Not sure that would improve things; I'd say that "s " really does belong on the
same line as the "name=%" and field width define.

As Stefano pointed out, splitting a string like this isn't really an issue with
sscanf either.

I suggest we just leave this one as is.

Johan


      reply	other threads:[~2020-04-06 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04  0:51 [PATCH] staging: greybus: quoted string split across lines Gokce Kuler
2020-04-04 23:31 ` [Outreachy kernel] " Stefano Brivio
2020-04-05  7:15 ` Greg KH
2020-04-06 10:15   ` Johan Hovold [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=20200406101549.GA16292@localhost \
    --to=johan@kernel.org \
    --cc=elder@kernel.org \
    --cc=gokcekuler@gmail.com \
    --cc=gregkh@linuxfoundation.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.