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


Groups > linux.kernel > #1703716 > unrolled thread

[PATCH 0/6] constify misc attribute_group structures.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-04 08:40 +0200
Last post2017-08-04 11:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/6]  constify misc attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 08:40 +0200
    [PATCH 1/6] misc: apds9802als: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 08:50 +0200
    Re: [PATCH 0/6] constify misc attribute_group structures. Arnd Bergmann <arnd@arndb.de> - 2017-08-04 11:20 +0200

#1703716 — [PATCH 0/6] constify misc attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 08:40 +0200
Subject[PATCH 0/6] constify misc attribute_group structures.
Message-ID<uaEr7-3r1-3@gated-at.bofh.it>
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.

Arvind Yadav (6):
  [PATCH 1/6] misc: apds9802als: constify attribute_group structures.
  [PATCH 2/6] misc: apds990x: constify attribute_group structures.
  [PATCH 3/6] misc: bh1770glc: constify attribute_group structures.
  [PATCH 4/6] misc: isl29020: constify attribute_group structures.
  [PATCH 5/6] misc: lis3lv02d: constify attribute_group structures.
  [PATCH 6/6] misc: ti-st: constify attribute_group structures.

 drivers/misc/apds9802als.c         | 2 +-
 drivers/misc/apds990x.c            | 2 +-
 drivers/misc/bh1770glc.c           | 2 +-
 drivers/misc/isl29020.c            | 2 +-
 drivers/misc/lis3lv02d/lis3lv02d.c | 2 +-
 drivers/misc/ti-st/st_kim.c        | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1703720 — [PATCH 1/6] misc: apds9802als: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 08:50 +0200
Subject[PATCH 1/6] misc: apds9802als: constify attribute_group structures.
Message-ID<uaEAO-3uH-17@gated-at.bofh.it>
In reply to#1703716
attribute_group are not supposed to change at runtime. All functions
working with attribute_group 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/misc/apds9802als.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index c6cc3dc..05ee771 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -197,7 +197,7 @@ static DEVICE_ATTR(lux0_sensor_range, S_IRUGO | S_IWUSR,
 	NULL
 };
 
-static struct attribute_group m_als_gr = {
+static const struct attribute_group m_als_gr = {
 	.name = "apds9802als",
 	.attrs = mid_att_als
 };
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1703812 — Re: [PATCH 0/6] constify misc attribute_group structures.

FromArnd Bergmann <arnd@arndb.de>
Date2017-08-04 11:20 +0200
SubjectRe: [PATCH 0/6] constify misc attribute_group structures.
Message-ID<uaGVX-56P-1@gated-at.bofh.it>
In reply to#1703716
On Fri, Aug 4, 2017 at 8:37 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> attribute_group are not supposed to change at runtime. All functions
> working with attribute_group provided by <linux/sysfs.h> work with
> const attribute_group. So mark the non-const structs as const.
>
> Arvind Yadav (6):
>   [PATCH 1/6] misc: apds9802als: constify attribute_group structures.
>   [PATCH 2/6] misc: apds990x: constify attribute_group structures.
>   [PATCH 3/6] misc: bh1770glc: constify attribute_group structures.
>   [PATCH 4/6] misc: isl29020: constify attribute_group structures.
>   [PATCH 5/6] misc: lis3lv02d: constify attribute_group structures.
>   [PATCH 6/6] misc: ti-st: constify attribute_group structures.

Looks good to me, thanks

       Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web