public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] constify s390 attribute_group structures
@ 2017-07-19  7:09 Arvind Yadav
  2017-07-19  7:09 ` [PATCH 1/8] s390: zcrypt_queue: constify " Arvind Yadav
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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 (9):
  s390: zcrypt_queue: constify attribute_group structures.
  s390: zcrypt_card: constify attribute_group structures.
  s390: dasd_devmap: constify attribute_group structures.
  s390: device: constify attribute_group structures.
  s390: qeth: constify attribute_group structures.
  s390: raw3270: constify attribute_group structures.
  s390: tape_core: constify attribute_group structures.
  s390: sclp_ocf: constify attribute_group structures.

 drivers/s390/block/dasd_devmap.c   | 2 +-
 drivers/s390/char/raw3270.c        | 2 +-
 drivers/s390/char/sclp_ocf.c       | 2 +-
 drivers/s390/char/tape_core.c      | 2 +-
 drivers/s390/cio/device.c          | 4 ++--
 drivers/s390/crypto/zcrypt_card.c  | 2 +-
 drivers/s390/crypto/zcrypt_queue.c | 2 +-
 drivers/s390/net/qeth_l3_sys.c     | 8 ++++----
 8 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] s390: zcrypt_queue: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 2/8] s390: zcrypt_card: " Arvind Yadav
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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.

File size before:
   text	   data	    bss	    dec	    hex	filename
   1361	     96	      0	   1457	    5b1	s390/crypto/zcrypt_queue.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   1425	     32	      0	   1457	    5b1	s390/crypto/zcrypt_queue.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/s390/crypto/zcrypt_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/zcrypt_queue.c b/drivers/s390/crypto/zcrypt_queue.c
index a303f3b..4742be0 100644
--- a/drivers/s390/crypto/zcrypt_queue.c
+++ b/drivers/s390/crypto/zcrypt_queue.c
@@ -89,7 +89,7 @@ static DEVICE_ATTR(online, 0644, zcrypt_queue_online_show,
 	NULL,
 };
 
-static struct attribute_group zcrypt_queue_attr_group = {
+static const struct attribute_group zcrypt_queue_attr_group = {
 	.attrs = zcrypt_queue_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/8] s390: zcrypt_card: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
  2017-07-19  7:09 ` [PATCH 1/8] s390: zcrypt_queue: constify " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 3/8] s390: dasd_devmap: " Arvind Yadav
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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.

File size before:
   text	   data	    bss	    dec	    hex	filename
   1019	    160	      0	   1179	    49b	drivers/s390/crypto/zcrypt_card.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   1083	     96	      0	   1179	    49b	drivers/s390/crypto/zcrypt_card.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/s390/crypto/zcrypt_card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/zcrypt_card.c b/drivers/s390/crypto/zcrypt_card.c
index 53436ea..f85dacf 100644
--- a/drivers/s390/crypto/zcrypt_card.c
+++ b/drivers/s390/crypto/zcrypt_card.c
@@ -98,7 +98,7 @@ static DEVICE_ATTR(online, 0644, zcrypt_card_online_show,
 	NULL,
 };
 
-static struct attribute_group zcrypt_card_attr_group = {
+static const struct attribute_group zcrypt_card_attr_group = {
 	.attrs = zcrypt_card_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/8] s390: dasd_devmap: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
  2017-07-19  7:09 ` [PATCH 1/8] s390: zcrypt_queue: constify " Arvind Yadav
  2017-07-19  7:09 ` [PATCH 2/8] s390: zcrypt_card: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 4/8] s390: device: " Arvind Yadav
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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/s390/block/dasd_devmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 779dce0..7b539d9 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -1634,7 +1634,7 @@ static DEVICE_ATTR(path_interval, 0644, dasd_path_interval_show,
 	NULL,
 };
 
-static struct attribute_group dasd_attr_group = {
+static const struct attribute_group dasd_attr_group = {
 	.attrs = dasd_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/8] s390: device: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 3/8] s390: dasd_devmap: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 5/8] s390: qeth: " Arvind Yadav
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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/s390/cio/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 7be01a5..489b583 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -612,7 +612,7 @@ static ssize_t vpm_show(struct device *dev, struct device_attribute *attr,
 	NULL,
 };
 
-static struct attribute_group io_subchannel_attr_group = {
+static const struct attribute_group io_subchannel_attr_group = {
 	.attrs = io_subchannel_attrs,
 };
 
@@ -626,7 +626,7 @@ static ssize_t vpm_show(struct device *dev, struct device_attribute *attr,
 	NULL,
 };
 
-static struct attribute_group ccwdev_attr_group = {
+static const struct attribute_group ccwdev_attr_group = {
 	.attrs = ccwdev_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/8] s390: qeth: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 4/8] s390: device: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 6/8] s390: raw3270: " Arvind Yadav
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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.

File size before:
   text	   data	    bss	    dec	    hex	filename
   6763	   1216	      0	   7979	   1f2b	drivers/s390/net/qeth_l3_sys.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   7019	    960	      0	   7971	   1f2b	drivers/s390/net/qeth_l3_sys.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/s390/net/qeth_l3_sys.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c
index f2f94f5..1a80ce4 100644
--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -350,7 +350,7 @@ static DEVICE_ATTR(hsuid, 0644, qeth_l3_dev_hsuid_show,
 	NULL,
 };
 
-static struct attribute_group qeth_l3_device_attr_group = {
+static const struct attribute_group qeth_l3_device_attr_group = {
 	.attrs = qeth_l3_device_attrs,
 };
 
@@ -680,7 +680,7 @@ static QETH_DEVICE_ATTR(ipato_del6, del6, 0200, NULL,
 	NULL,
 };
 
-static struct attribute_group qeth_device_ipato_group = {
+static const struct attribute_group qeth_device_ipato_group = {
 	.name = "ipa_takeover",
 	.attrs = qeth_ipato_device_attrs,
 };
@@ -843,7 +843,7 @@ static QETH_DEVICE_ATTR(vipa_del6, del6, 0200, NULL,
 	NULL,
 };
 
-static struct attribute_group qeth_device_vipa_group = {
+static const struct attribute_group qeth_device_vipa_group = {
 	.name = "vipa",
 	.attrs = qeth_vipa_device_attrs,
 };
@@ -1006,7 +1006,7 @@ static QETH_DEVICE_ATTR(rxip_del6, del6, 0200, NULL,
 	NULL,
 };
 
-static struct attribute_group qeth_device_rxip_group = {
+static const struct attribute_group qeth_device_rxip_group = {
 	.name = "rxip",
 	.attrs = qeth_rxip_device_attrs,
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/8] s390: raw3270: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (4 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 5/8] s390: qeth: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 7/8] s390: tape_core: " Arvind Yadav
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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.

File size before:
   text	   data	    bss	    dec	    hex	filename
   8069	    816	     16	   8901	   22c5	drivers/s390/char/raw3270.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   8133	    752	     16	   8901	   22c5	drivers/s390/char/raw3270.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/s390/char/raw3270.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 710f229..5d4f053 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -1082,7 +1082,7 @@ struct raw3270_view *
 	NULL,
 };
 
-static struct attribute_group raw3270_attr_group = {
+static const struct attribute_group raw3270_attr_group = {
 	.attrs = raw3270_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 7/8] s390: tape_core: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (5 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 6/8] s390: raw3270: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  7:09 ` [PATCH 8/8] s390: sclp_ocf: " Arvind Yadav
  2017-07-19  8:50 ` [PATCH 0/8] constify s390 " Martin Schwidefsky
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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.

File size before:
   text	   data	    bss	    dec	    hex	filename
  11511	    656	     16	  12183	   2f97	drivers/s390/char/tape_core.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
  11575	    592	     16	  12183	   2f97	drivers/s390/char/tape_core.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/s390/char/tape_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
index 3c379da..9dd4534 100644
--- a/drivers/s390/char/tape_core.c
+++ b/drivers/s390/char/tape_core.c
@@ -175,7 +175,7 @@ static int devid_to_int(struct ccw_dev_id *dev_id)
 	NULL
 };
 
-static struct attribute_group tape_attr_group = {
+static const struct attribute_group tape_attr_group = {
 	.attrs = tape_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 8/8] s390: sclp_ocf: constify attribute_group structures.
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (6 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 7/8] s390: tape_core: " Arvind Yadav
@ 2017-07-19  7:09 ` Arvind Yadav
  2017-07-19  8:50 ` [PATCH 0/8] constify s390 " Martin Schwidefsky
  8 siblings, 0 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-07-19  7:09 UTC (permalink / raw)
  To: schwidefsky, freude, heiko.carstens, linux-s390, sth, hoeppner,
	sebott, oberpar, wi, ubraun, jwi
  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/s390/char/sclp_ocf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/char/sclp_ocf.c b/drivers/s390/char/sclp_ocf.c
index f59b717..f9cbb1a 100644
--- a/drivers/s390/char/sclp_ocf.c
+++ b/drivers/s390/char/sclp_ocf.c
@@ -126,7 +126,7 @@ static ssize_t hmc_network_show(struct kobject *kobj,
 	NULL,
 };
 
-static struct attribute_group ocf_attr_group = {
+static const struct attribute_group ocf_attr_group = {
 	.attrs = ocf_attrs,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/8] constify s390 attribute_group structures
  2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
                   ` (7 preceding siblings ...)
  2017-07-19  7:09 ` [PATCH 8/8] s390: sclp_ocf: " Arvind Yadav
@ 2017-07-19  8:50 ` Martin Schwidefsky
  8 siblings, 0 replies; 10+ messages in thread
From: Martin Schwidefsky @ 2017-07-19  8:50 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: freude, heiko.carstens, linux-s390, sth, hoeppner, sebott,
	oberpar, wi, ubraun, jwi, linux-kernel

On Wed, 19 Jul 2017 12:39:09 +0530
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 (9):
>   s390: zcrypt_queue: constify attribute_group structures.
>   s390: zcrypt_card: constify attribute_group structures.
>   s390: dasd_devmap: constify attribute_group structures.
>   s390: device: constify attribute_group structures.
>   s390: qeth: constify attribute_group structures.
>   s390: raw3270: constify attribute_group structures.
>   s390: tape_core: constify attribute_group structures.
>   s390: sclp_ocf: constify attribute_group structures.
> 
>  drivers/s390/block/dasd_devmap.c   | 2 +-
>  drivers/s390/char/raw3270.c        | 2 +-
>  drivers/s390/char/sclp_ocf.c       | 2 +-
>  drivers/s390/char/tape_core.c      | 2 +-
>  drivers/s390/cio/device.c          | 4 ++--
>  drivers/s390/crypto/zcrypt_card.c  | 2 +-
>  drivers/s390/crypto/zcrypt_queue.c | 2 +-
>  drivers/s390/net/qeth_l3_sys.c     | 8 ++++----
>  8 files changed, 12 insertions(+), 12 deletions(-)

Applied to linux-s390:features for the next merge window. Thanks.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-19  8:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-19  7:09 [PATCH 0/8] constify s390 attribute_group structures Arvind Yadav
2017-07-19  7:09 ` [PATCH 1/8] s390: zcrypt_queue: constify " Arvind Yadav
2017-07-19  7:09 ` [PATCH 2/8] s390: zcrypt_card: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 3/8] s390: dasd_devmap: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 4/8] s390: device: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 5/8] s390: qeth: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 6/8] s390: raw3270: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 7/8] s390: tape_core: " Arvind Yadav
2017-07-19  7:09 ` [PATCH 8/8] s390: sclp_ocf: " Arvind Yadav
2017-07-19  8:50 ` [PATCH 0/8] constify s390 " Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox