* [PATCH 0/6] constify misc attribute_group structures.
@ 2017-08-04 6:37 Arvind Yadav
2017-08-04 6:37 ` [PATCH 1/6] misc: apds9802als: constify " Arvind Yadav
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/6] misc: apds9802als: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 6:37 ` [PATCH 2/6] misc: apds990x: " Arvind Yadav
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] misc: apds990x: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
2017-08-04 6:37 ` [PATCH 1/6] misc: apds9802als: constify " Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 6:37 ` [PATCH 3/6] misc: bh1770glc: " Arvind Yadav
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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/apds990x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 84e5b94..c9f0703 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -1051,7 +1051,7 @@ static ssize_t apds990x_chip_id_show(struct device *dev,
NULL
};
-static struct attribute_group apds990x_attribute_group[] = {
+static const struct attribute_group apds990x_attribute_group[] = {
{.attrs = sysfs_attrs_ctrl },
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] misc: bh1770glc: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
2017-08-04 6:37 ` [PATCH 1/6] misc: apds9802als: constify " Arvind Yadav
2017-08-04 6:37 ` [PATCH 2/6] misc: apds990x: " Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 6:37 ` [PATCH 4/6] misc: isl29020: " Arvind Yadav
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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/bh1770glc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index 38fcfe2..9c62bf0 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -1175,7 +1175,7 @@ static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR, bh1770_power_state_show,
NULL
};
-static struct attribute_group bh1770_attribute_group = {
+static const struct attribute_group bh1770_attribute_group = {
.attrs = sysfs_attrs
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] misc: isl29020: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
` (2 preceding siblings ...)
2017-08-04 6:37 ` [PATCH 3/6] misc: bh1770glc: " Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 6:37 ` [PATCH 5/6] misc: lis3lv02d: " Arvind Yadav
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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/isl29020.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/isl29020.c b/drivers/misc/isl29020.c
index 4a9c50a..15d1749 100644
--- a/drivers/misc/isl29020.c
+++ b/drivers/misc/isl29020.c
@@ -145,7 +145,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 = "isl29020",
.attrs = mid_att_als
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] misc: lis3lv02d: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
` (3 preceding siblings ...)
2017-08-04 6:37 ` [PATCH 4/6] misc: isl29020: " Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 6:37 ` [PATCH 6/6] misc: ti-st: " Arvind Yadav
2017-08-04 9:10 ` [PATCH 0/6] constify misc " Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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/lis3lv02d/lis3lv02d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index e389b0b..8d53609 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -856,7 +856,7 @@ static DEVICE_ATTR(rate, S_IRUGO | S_IWUSR, lis3lv02d_rate_show,
NULL
};
-static struct attribute_group lis3lv02d_attribute_group = {
+static const struct attribute_group lis3lv02d_attribute_group = {
.attrs = lis3lv02d_attributes
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] misc: ti-st: constify attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
` (4 preceding siblings ...)
2017-08-04 6:37 ` [PATCH 5/6] misc: lis3lv02d: " Arvind Yadav
@ 2017-08-04 6:37 ` Arvind Yadav
2017-08-04 9:10 ` [PATCH 0/6] constify misc " Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-04 6:37 UTC (permalink / raw)
To: eric.piel, gregkh, arnd; +Cc: linux-kernel
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/ti-st/st_kim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index e74413f..b77aaca 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -660,7 +660,7 @@ static ssize_t show_flow_cntrl(struct device *dev,
NULL,
};
-static struct attribute_group uim_attr_grp = {
+static const struct attribute_group uim_attr_grp = {
.attrs = uim_attrs,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/6] constify misc attribute_group structures.
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
` (5 preceding siblings ...)
2017-08-04 6:37 ` [PATCH 6/6] misc: ti-st: " Arvind Yadav
@ 2017-08-04 9:10 ` Arnd Bergmann
6 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-08-04 9:10 UTC (permalink / raw)
To: Arvind Yadav; +Cc: eric.piel, gregkh, Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-04 9:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-04 6:37 [PATCH 0/6] constify misc attribute_group structures Arvind Yadav
2017-08-04 6:37 ` [PATCH 1/6] misc: apds9802als: constify " Arvind Yadav
2017-08-04 6:37 ` [PATCH 2/6] misc: apds990x: " Arvind Yadav
2017-08-04 6:37 ` [PATCH 3/6] misc: bh1770glc: " Arvind Yadav
2017-08-04 6:37 ` [PATCH 4/6] misc: isl29020: " Arvind Yadav
2017-08-04 6:37 ` [PATCH 5/6] misc: lis3lv02d: " Arvind Yadav
2017-08-04 6:37 ` [PATCH 6/6] misc: ti-st: " Arvind Yadav
2017-08-04 9:10 ` [PATCH 0/6] constify misc " Arnd Bergmann
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.