public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: david.kershner@unisys.com, Timothy.Sell@unisys.com,
	bryan.thompson@unisys.com, jon.frisch@unisys.com,
	david.binder@unisys.com, sparmaintainer@unisys.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: unisys: visorbus: constify attribute_group structures.
Date: Mon, 17 Jul 2017 14:37:34 +0200	[thread overview]
Message-ID: <20170717123734.GA30411@kroah.com> (raw)
In-Reply-To: <f5e3becd-8702-5d00-171c-8b6bdcc17f50@gmail.com>

On Mon, Jul 17, 2017 at 05:43:14PM +0530, Arvind Yadav wrote:
> Hi Greg,
> 
> 
> On Monday 17 July 2017 04:15 PM, Greg KH wrote:
> > On Mon, Jul 17, 2017 at 02:55:37PM +0530, Arvind Yadav wrote:
> > > attribute_groups are not supposed to change at runtime. All functions
> > > working with attribute_groups provided by <linux/sysfs.h> work
> > > with const attribute_group. So mark the non-const structs as const.
> > > 
> > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> > > ---
> > >   drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++--
> > >   drivers/staging/unisys/visorbus/visorchipset.c  | 2 +-
> > >   2 files changed, 3 insertions(+), 3 deletions(-)
> > Why not just use the ATTRIBUTE_GROUPS() macro for these?  Or is there
> > something that is preventing that?
> Yes, we can use. if we are only initializing '.attrs'.
> ATTRIBUTE_GROUPS() will not work if we will initialize other member of
> attribute_group like 'bin_attrs', 'is_visible', and  'name'.

That means you should redo this patch :)

Also, your changelog text had a typo, it is "attribute_group", not
"attribute_groups".

thanks,

greg k-h

  reply	other threads:[~2017-07-17 12:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17  9:25 [PATCH] staging: unisys: visorbus: constify attribute_group structures Arvind Yadav
2017-07-17 10:45 ` Greg KH
2017-07-17 12:13   ` Arvind Yadav
2017-07-17 12:37     ` Greg KH [this message]
2017-07-17 21:36       ` Kershner, David A
2017-07-18  5:05         ` Greg KH

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=20170717123734.GA30411@kroah.com \
    --to=greg@kroah.com \
    --cc=Timothy.Sell@unisys.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=bryan.thompson@unisys.com \
    --cc=david.binder@unisys.com \
    --cc=david.kershner@unisys.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=jon.frisch@unisys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparmaintainer@unisys.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox