Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1688900

Re: [PATCH] staging: unisys: visorbus: constify attribute_group structures.

From Greg KH <greg@kroah.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: unisys: visorbus: constify attribute_group structures.
Date 2017-07-17 12:50 +0200
Message-ID <u4bLe-3Tv-37@gated-at.bofh.it> (permalink)
References <u4avN-3bA-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging: unisys: visorbus: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-17 11:30 +0200
  Re: [PATCH] staging: unisys: visorbus: constify attribute_group  structures. Greg KH <greg@kroah.com> - 2017-07-17 12:50 +0200
    Re: [PATCH] staging: unisys: visorbus: constify attribute_group  structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-17 14:20 +0200
      Re: [PATCH] staging: unisys: visorbus: constify attribute_group  structures. Greg KH <greg@kroah.com> - 2017-07-17 14:40 +0200
        RE: [PATCH] staging: unisys: visorbus: constify attribute_group  structures. "Kershner, David A" <David.Kershner@unisys.com> - 2017-07-17 23:40 +0200
          Re: [PATCH] staging: unisys: visorbus: constify attribute_group  structures. Greg KH <greg@kroah.com> - 2017-07-18 07:10 +0200

csiph-web