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


Groups > linux.kernel > #1703903 > unrolled thread

[PATCH 00/11] constify usb attribute_group structures.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-04 14:10 +0200
Last post2017-08-04 14:20 +0200
Articles 10 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/11] constify usb attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 08/11] usb: phy-tahvo: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 04/11] usb: usbtmc: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 05/11] usb: hcd: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
    [PATCH 02/11] usb: chipidea: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:20 +0200

#1703903 — [PATCH 00/11] constify usb attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 00/11] constify usb attribute_group structures.
Message-ID<uaJAt-6MJ-7@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 (11):
  [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.
  [PATCH 02/11] usb: chipidea: constify attribute_group structures.
  [PATCH 03/11] usb: chipidea: otg_fsm: constify attribute_group structures.
  [PATCH 04/11] usb: usbtmc: constify attribute_group structures.
  [PATCH 05/11] usb: hcd: constify attribute_group structures.
  [PATCH 06/11] usb: usbsevseg: constify attribute_group structures.
  [PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures.
  [PATCH 08/11] usb: phy-tahvo: constify attribute_group structures.
  [PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures.
  [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures.
  [PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures.

 drivers/usb/atm/ueagle-atm.c     | 2 +-
 drivers/usb/chipidea/core.c      | 2 +-
 drivers/usb/chipidea/otg_fsm.c   | 2 +-
 drivers/usb/class/usbtmc.c       | 4 ++--
 drivers/usb/core/hcd.c           | 2 +-
 drivers/usb/misc/usbsevseg.c     | 2 +-
 drivers/usb/phy/phy-mv-usb.c     | 2 +-
 drivers/usb/phy/phy-tahvo.c      | 2 +-
 drivers/usb/wusbcore/cbaf.c      | 2 +-
 drivers/usb/wusbcore/dev-sysfs.c | 2 +-
 drivers/usb/wusbcore/wusbhc.c    | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1703906 — [PATCH 08/11] usb: phy-tahvo: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 08/11] usb: phy-tahvo: constify attribute_group structures.
Message-ID<uaJAt-6MJ-19@gated-at.bofh.it>
In reply to#1703903
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/usb/phy/phy-tahvo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index a31c868..8babd31 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -326,7 +326,7 @@ static ssize_t otg_mode_store(struct device *device,
 	NULL
 };
 
-static struct attribute_group tahvo_attr_group = {
+static const struct attribute_group tahvo_attr_group = {
 	.attrs = tahvo_attributes,
 };
 
-- 
1.9.1

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


#1703910 — [PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures.
Message-ID<uaJAu-6MJ-29@gated-at.bofh.it>
In reply to#1703903
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/usb/wusbcore/wusbhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c
index a273a91..5338e42 100644
--- a/drivers/usb/wusbcore/wusbhc.c
+++ b/drivers/usb/wusbcore/wusbhc.c
@@ -244,7 +244,7 @@ static ssize_t wusb_retry_count_store(struct device *dev,
 		NULL,
 };
 
-static struct attribute_group wusbhc_attr_group = {
+static const struct attribute_group wusbhc_attr_group = {
 	.name = NULL,	/* we want them in the same directory */
 	.attrs = wusbhc_attrs,
 };
-- 
1.9.1

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


#1703911 — [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.
Message-ID<uaJAu-6MJ-39@gated-at.bofh.it>
In reply to#1703903
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/usb/atm/ueagle-atm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index df67815..5f31d88 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2522,7 +2522,7 @@ static int claim_interface(struct usb_device *usb_dev,
 	&dev_attr_stat_firmid.attr,
 	NULL,
 };
-static struct attribute_group attr_grp = {
+static const struct attribute_group attr_grp = {
 	.attrs = attrs,
 };
 
-- 
1.9.1

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


#1703913 — [PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures.
Message-ID<uaJAu-6MJ-41@gated-at.bofh.it>
In reply to#1703903
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/usb/phy/phy-mv-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c
index 697a741..d17cc92 100644
--- a/drivers/usb/phy/phy-mv-usb.c
+++ b/drivers/usb/phy/phy-mv-usb.c
@@ -650,7 +650,7 @@ static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR,
 	NULL,
 };
 
-static struct attribute_group inputs_attr_group = {
+static const struct attribute_group inputs_attr_group = {
 	.name = "inputs",
 	.attrs = inputs_attrs,
 };
-- 
1.9.1

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


#1703914 — [PATCH 04/11] usb: usbtmc: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 04/11] usb: usbtmc: constify attribute_group structures.
Message-ID<uaJAu-6MJ-43@gated-at.bofh.it>
In reply to#1703903
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/usb/class/usbtmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 578f424..6ebfabf 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1085,7 +1085,7 @@ static DEVICE_ATTR_RO(name)
 	NULL,
 };
 
-static struct attribute_group capability_attr_grp = {
+static const struct attribute_group capability_attr_grp = {
 	.attrs = capability_attrs,
 };
 
@@ -1151,7 +1151,7 @@ static DEVICE_ATTR_RW(name)
 	NULL,
 };
 
-static struct attribute_group data_attr_grp = {
+static const struct attribute_group data_attr_grp = {
 	.attrs = data_attrs,
 };
 
-- 
1.9.1

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


#1703915 — [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures.
Message-ID<uaJAu-6MJ-45@gated-at.bofh.it>
In reply to#1703903
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/usb/wusbcore/dev-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/dev-sysfs.c b/drivers/usb/wusbcore/dev-sysfs.c
index d4de56b..78212f8 100644
--- a/drivers/usb/wusbcore/dev-sysfs.c
+++ b/drivers/usb/wusbcore/dev-sysfs.c
@@ -114,7 +114,7 @@ static ssize_t wusb_ck_store(struct device *dev,
 		NULL,
 };
 
-static struct attribute_group wusb_dev_attr_group = {
+static const struct attribute_group wusb_dev_attr_group = {
 	.name = NULL,	/* we want them in the same directory */
 	.attrs = wusb_dev_attrs,
 };
-- 
1.9.1

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


#1703916 — [PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures.
Message-ID<uaJAv-6MJ-47@gated-at.bofh.it>
In reply to#1703903
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/usb/wusbcore/cbaf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/cbaf.c b/drivers/usb/wusbcore/cbaf.c
index fb70cbef..aa4e440 100644
--- a/drivers/usb/wusbcore/cbaf.c
+++ b/drivers/usb/wusbcore/cbaf.c
@@ -586,7 +586,7 @@ static ssize_t cbaf_wusb_ck_store(struct device *dev,
 	NULL,
 };
 
-static struct attribute_group cbaf_dev_attr_group = {
+static const struct attribute_group cbaf_dev_attr_group = {
 	.name = NULL,	/* we want them in the same directory */
 	.attrs = cbaf_dev_attrs,
 };
-- 
1.9.1

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


#1703919 — [PATCH 05/11] usb: hcd: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:10 +0200
Subject[PATCH 05/11] usb: hcd: constify attribute_group structures.
Message-ID<uaJAv-6MJ-49@gated-at.bofh.it>
In reply to#1703903
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/usb/core/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ab1bb3b..df978d6 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -972,7 +972,7 @@ static ssize_t interface_authorized_default_store(struct device *dev,
 		NULL,
 };
 
-static struct attribute_group usb_bus_attr_group = {
+static const struct attribute_group usb_bus_attr_group = {
 	.name = NULL,	/* we want them in the same directory */
 	.attrs = usb_bus_attrs,
 };
-- 
1.9.1

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


#1703924 — [PATCH 02/11] usb: chipidea: constify attribute_group structures.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-04 14:20 +0200
Subject[PATCH 02/11] usb: chipidea: constify attribute_group structures.
Message-ID<uaJK9-6Qn-1@gated-at.bofh.it>
In reply to#1703903
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/usb/chipidea/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index b17ed3a..1ef3ae4 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -887,7 +887,7 @@ static ssize_t ci_role_store(struct device *dev,
 	NULL,
 };
 
-static struct attribute_group ci_attr_group = {
+static const struct attribute_group ci_attr_group = {
 	.attrs = ci_attrs,
 };
 
-- 
1.9.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web