All of lore.kernel.org
 help / color / mirror / Atom feed
From: Du Cheng <ducheng2@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Subject: Re: [PATCH v2] staging: greybus: fix coding style of greybus/loopback.c
Date: Tue, 16 Feb 2021 21:12:23 +0800	[thread overview]
Message-ID: <20210216131223.GA478778@ThinkCentre-M83> (raw)
In-Reply-To: <YCusQZknNbqFef2X@kroah.com>

On Tue, Feb 16, 2021 at 12:28:01PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Feb 16, 2021 at 07:13:53PM +0800, Du Cheng wrote:
> > fix macro gb_loopback_stats_attrs by wrapping its multi-line definition
> > inside a do {} while(0) block, in compliance to scripts/checkpatch.pl.
> > 
> > Signed-off-by: Du Cheng <ducheng2@gmail.com>
> > ---
> > changes v2:
> > * relign backslashes with tabstop=8
> > * improve description and subject
> > 
> > changes v1:
> > * fix coding style of the macro
> > 
> >  drivers/staging/greybus/loopback.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> > index 2471448ba42a..24b769688817 100644
> > --- a/drivers/staging/greybus/loopback.c
> > +++ b/drivers/staging/greybus/loopback.c
> > @@ -163,9 +163,11 @@ static ssize_t name##_avg_show(struct device *dev,		\
> >  static DEVICE_ATTR_RO(name##_avg)
> >  
> >  #define gb_loopback_stats_attrs(field)				\
> > +do {								\
> >  	gb_loopback_ro_stats_attr(field, min, u);		\
> >  	gb_loopback_ro_stats_attr(field, max, u);		\
> > -	gb_loopback_ro_avg_attr(field)
> > +	gb_loopback_ro_avg_attr(field);				\
> > +} while (0)
> >  
> >  #define gb_loopback_attr(field, type)					\
> >  static ssize_t field##_show(struct device *dev,				\
> > -- 
> > 2.27.0
> 
> Did you successfully build this change?
> 
> Please do so...
> 
> thanks,
> 
> greg k-h

I realized I did not enable greybus subsystem in the config.
after the enabling CONFIG_GREYBUS_LOOPBACK=m the make failed with compilation errors.

Then I realized this macro is actually used for function definition, not as statements.
I shall take back this PATCH as the proposed change in not applicable in this case.

Thanks!
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

      reply	other threads:[~2021-02-16 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 11:13 [PATCH v2] staging: greybus: fix coding style of greybus/loopback.c Du Cheng
2021-02-16 11:25 ` Dan Carpenter
2021-02-16 11:28 ` Greg Kroah-Hartman
2021-02-16 13:12   ` Du Cheng [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=20210216131223.GA478778@ThinkCentre-M83 \
    --to=ducheng2@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.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.