Skip to contentSkip to conversation

Constify attribute_group structures

PATCH In review Bhumika Goyal 2 participants 13 messages Oct 1, 2016 – Oct 4, 2016 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Constify attribute_group structures

Constify attribute_group structures.
This patchset is a follow-up of the patch: https://goo.gl/VzltBL
("iio: Declare event_attrs field of iio_info structure as const").

Bhumika Goyal (5):
Staging: iio: sca3000_core: constify attribute_group structures
Staging: iio: ad7280a: constify attribute_group structures
Staging: iio: ad7816: constify attribute_group structures
Staging: iio: addac: constify attribute_group structures
Staging: iio: ad7150: constify attribute_group structures

 drivers/staging/iio/accel/sca3000_core.c | 2 +-
 drivers/staging/iio/adc/ad7280a.c        | 2 +-
 drivers/staging/iio/adc/ad7816.c         | 2 +-
 drivers/staging/iio/addac/adt7316.c      | 4 ++--
 drivers/staging/iio/cdc/ad7150.c         | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/5 Staging: iio: sca3000_core: constify attribute_group structures

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
7745 864 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

File size after:
text data bss dec hex filename
7809 800 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

---
 drivers/staging/iio/accel/sca3000_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/accel/sca3000_core.c +1 -1
index d626125..774a8bf 100644
@@ -1010,7 +1010,7 @@ static struct attribute *sca3000_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group sca3000_event_attribute_group = {
+static const struct attribute_group sca3000_event_attribute_group = {
 	.attrs = sca3000_event_attributes,
 	.name = "events",
 };
Signature · 1 line
1.9.1
Acked-by on v1 1/5
#2 lore raw

Re: [Outreachy kernel] [PATCH 1/5] Staging: iio: sca3000_core: constify attribute_group structures

Quoted 43 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
7745 864 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

Quoted 6 lines

File size after:
text data bss dec hex filename
7809 800 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

Quoted 27 lines
---
 drivers/staging/iio/accel/sca3000_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/accel/sca3000_core.c +1 -2
index d626125..774a8bf 100644
@@ -1010,7 +1010,7 @@ static struct attribute *sca3000_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group sca3000_event_attribute_group = {
+static const struct attribute_group sca3000_event_attribute_group = {
 	.attrs = sca3000_event_attributes,
 	.name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-2-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [Outreachy kernel] [PATCH 1/5] Staging: iio: sca3000_core: constify attribute_group structures

Quoted 56 lines · Jonathan Cameron
Quoted 47 lines · Julia Lawall
Quoted 43 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
7745 864 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

Quoted 8 lines
Quoted 6 lines

File size after:
text data bss dec hex filename
7809 800 8 8617 21a9
drivers/staging/iio/accel/sca3000_core.o

Quoted 7 lines

Sorry, I'm not going to apply this one for the simple reason I just posted a patch that actually gets rid of these attrs in this driver entirely.

My fault, I should have noticed this was one of the ones you were going to be looking at and mentioned I was just polishing up that series so not to bother with this particular case!

It's not a problem.

Quoted 2 lines

Good patch though and well described!

Thanks.

Thanks,
Bhumika

Quoted 30 lines

Jonathan

Quoted 28 lines
Quoted 28 lines
---
 drivers/staging/iio/accel/sca3000_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/accel/sca3000_core.c +1 -2
index d626125..774a8bf 100644
@@ -1010,7 +1010,7 @@ static struct attribute *sca3000_event_attributes[] = {
     NULL,
 };
 
-static struct attribute_group sca3000_event_attribute_group = {
+static const struct attribute_group sca3000_event_attribute_group = {
     .attrs = sca3000_event_attributes,
     .name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-2-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#5 lore raw

PATCH 2/5 Staging: iio: ad7280a: constify attribute_group structures

In reply to Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
6271 672 776 7719 1e27
drivers/staging/iio/adc/ad7280a.o

File size after:
text data bss dec hex filename
6335 608 776 7719 1e27
drivers/staging/iio/adc/ad7280a.o

---
 drivers/staging/iio/adc/ad7280a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7280a.c +1 -1
index 977241e..ec54f6e 100644
@@ -777,7 +777,7 @@ static struct attribute *ad7280_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7280_event_attrs_group = {
+static const struct attribute_group ad7280_event_attrs_group = {
 	.attrs = ad7280_event_attributes,
 };
 
Signature · 1 line
1.9.1
Acked-by on v1 2/5
#6 lore raw

Re: [Outreachy kernel] [PATCH 2/5] Staging: iio: ad7280a: constify attribute_group structures

Quoted 43 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
6271 672 776 7719 1e27
drivers/staging/iio/adc/ad7280a.o

Quoted 6 lines

File size after:
text data bss dec hex filename
6335 608 776 7719 1e27
drivers/staging/iio/adc/ad7280a.o

Quoted 27 lines
---
 drivers/staging/iio/adc/ad7280a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7280a.c +1 -2
index 977241e..ec54f6e 100644
@@ -777,7 +777,7 @@ static struct attribute *ad7280_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7280_event_attrs_group = {
+static const struct attribute_group ad7280_event_attrs_group = {
 	.attrs = ad7280_event_attributes,
 };
 
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-3-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#7 lore raw

PATCH 3/5 Staging: iio: ad7816: constify attribute_group structures

In reply to Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
3295 768 0 4063 fdf drivers/staging/iio/adc/ad7816.o

File size after:
text data bss dec hex filename
3359 736 0 4095 fff drivers/staging/iio/adc/ad7816.o

---
 drivers/staging/iio/adc/ad7816.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7816.c +1 -1
index d5f0620..4f10225 100644
@@ -327,7 +327,7 @@ static struct attribute *ad7816_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7816_event_attribute_group = {
+static const struct attribute_group ad7816_event_attribute_group = {
 	.attrs = ad7816_event_attributes,
 	.name = "events",
 };
Signature · 1 line
1.9.1
Acked-by on v1 3/5
#8 lore raw

Re: [Outreachy kernel] [PATCH 3/5] Staging: iio: ad7816: constify attribute_group structures

Quoted 42 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
3295 768 0 4063 fdf drivers/staging/iio/adc/ad7816.o

Quoted 5 lines

File size after:
text data bss dec hex filename
3359 736 0 4095 fff drivers/staging/iio/adc/ad7816.o

Quoted 27 lines
---
 drivers/staging/iio/adc/ad7816.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7816.c +1 -2
index d5f0620..4f10225 100644
@@ -327,7 +327,7 @@ static struct attribute *ad7816_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7816_event_attribute_group = {
+static const struct attribute_group ad7816_event_attribute_group = {
 	.attrs = ad7816_event_attributes,
 	.name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-4-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#9 lore raw

PATCH 4/5 Staging: iio: addac: constify attribute_group structures

In reply to Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
11013 6096 0 17109 42d5
drivers/staging/iio/addac/adt7316.o

File size after:
text data bss dec hex filename
11141 5968 0 17109 42d5
drivers/staging/iio/addac/adt7316.o

---
 drivers/staging/iio/addac/adt7316.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/addac/adt7316.c +2 -2
index 3faffe5..a7d90c8 100644
@@ -2039,7 +2039,7 @@ static struct attribute *adt7316_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group adt7316_event_attribute_group = {
+static const struct attribute_group adt7316_event_attribute_group = {
 	.attrs = adt7316_event_attributes,
 	.name = "events",
 };
@@ -2060,7 +2060,7 @@ static struct attribute *adt7516_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group adt7516_event_attribute_group = {
+static const struct attribute_group adt7516_event_attribute_group = {
 	.attrs = adt7516_event_attributes,
 	.name = "events",
 };
Signature · 1 line
1.9.1
Acked-by on v1 4/5
#10 lore raw

Re: [Outreachy kernel] [PATCH 4/5] Staging: iio: addac: constify attribute_group structures

Quoted 43 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
11013 6096 0 17109 42d5
drivers/staging/iio/addac/adt7316.o

Quoted 6 lines

File size after:
text data bss dec hex filename
11141 5968 0 17109 42d5
drivers/staging/iio/addac/adt7316.o

Quoted 36 lines
---
 drivers/staging/iio/addac/adt7316.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/addac/adt7316.c +2 -3
index 3faffe5..a7d90c8 100644
@@ -2039,7 +2039,7 @@ static struct attribute *adt7316_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group adt7316_event_attribute_group = {
+static const struct attribute_group adt7316_event_attribute_group = {
 	.attrs = adt7316_event_attributes,
 	.name = "events",
 };
@@ -2060,7 +2060,7 @@ static struct attribute *adt7516_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group adt7516_event_attribute_group = {
+static const struct attribute_group adt7516_event_attribute_group = {
 	.attrs = adt7516_event_attributes,
 	.name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-5-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#11 lore raw

PATCH 5/5 Staging: iio: ad7150: constify attribute_group structures

In reply to Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
3561 1152 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

File size after:
text data bss dec hex filename
3625 1088 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

---
 drivers/staging/iio/cdc/ad7150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/cdc/ad7150.c +1 -1
index 5578a07..6998c3d 100644
@@ -562,7 +562,7 @@ static struct attribute *ad7150_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7150_event_attribute_group = {
+static const struct attribute_group ad7150_event_attribute_group = {
 	.attrs = ad7150_event_attributes,
 	.name = "events",
 };
Signature · 1 line
1.9.1
Acked-by on v1 5/5
#12 lore raw

Re: [Outreachy kernel] [PATCH 5/5] Staging: iio: ad7150: constify attribute_group structures

Quoted 42 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
3561 1152 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

Quoted 5 lines

File size after:
text data bss dec hex filename
3625 1088 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

Quoted 27 lines
---
 drivers/staging/iio/cdc/ad7150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/cdc/ad7150.c +1 -2
index 5578a07..6998c3d 100644
@@ -562,7 +562,7 @@ static struct attribute *ad7150_event_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group ad7150_event_attribute_group = {
+static const struct attribute_group ad7150_event_attribute_group = {
 	.attrs = ad7150_event_attributes,
 	.name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-6-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#14 lore raw

Re: [Outreachy kernel] [PATCH 5/5] Staging: iio: ad7150: constify attribute_group structures

Quoted 54 lines · Jonathan Cameron
Quoted 46 lines · Julia Lawall
Quoted 42 lines · Bhumika Goyal

Check for attribute_group structures that are only stored in the event_attrs filed of iio_info structure. As the event_attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.event_attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
text data bss dec hex filename
3561 1152 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

Quoted 7 lines
Quoted 5 lines

File size after:
text data bss dec hex filename
3625 1088 8 4721 1271 drivers/staging/iio/cdc/ad7150.o

Quoted 8 lines

Applied and pushed out as testing for the autobuilders to play with it.

Thanks for this nice little series. Only comment is don't forget that there are drivers that could do with this fix outside of staging! (grep suggests 5 drivers in drivers/iio)

If you would like to fix those up as well, that would be great.

I will fix up those as well :)

Thanks,
Bhumika

Quoted 31 lines

Jonathan

Quoted 28 lines
Quoted 28 lines
---
 drivers/staging/iio/cdc/ad7150.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/cdc/ad7150.c +1 -2
index 5578a07..6998c3d 100644
@@ -562,7 +562,7 @@ static struct attribute *ad7150_event_attributes[] = {
     NULL,
 };
 
-static struct attribute_group ad7150_event_attribute_group = {
+static const struct attribute_group ad7150_event_attribute_group = {
     .attrs = ad7150_event_attributes,
     .name = "events",
 };
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1475349315-6155-6-git-send-email-bhumirks%40gmail.com.
For more options, visit https://groups.google.com/d/optout.