Skip to contentSkip to conversation

driver core: constify devlink class

PATCH In review Bartosz Golaszewski 4 participants 6 messages Oct 14, 2024 – Nov 1, 2024 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 driver core: constify devlink class

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -1
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
-static struct class devlink_class = {
+static const struct class devlink_class = {
 	.name = "devlink",
 	.dev_groups = devlink_groups,
 	.dev_release = devlink_dev_release,
Signature · 1 line
2.43.0
#1 lore raw
Quoted 24 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -2
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
-static struct class devlink_class = {
+static const struct class devlink_class = {
        .name = "devlink",
        .dev_groups = devlink_groups,
        .dev_release = devlink_dev_release,
--
Quoted 2 lines

2.43.0

Gentle ping.

Bart

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Bartosz Golaszewski
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

Quoted 20 lines
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -2
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
-static struct class devlink_class = {
+static const struct class devlink_class = {
        .name = "devlink",
        .dev_groups = devlink_groups,
        .dev_release = devlink_dev_release,
--

2.43.0

#3 lore raw
Quoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

-Saravana

Quoted 21 lines
Quoted 21 lines
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +1 -2
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
-static struct class devlink_class = {
+static const struct class devlink_class = {
        .name = "devlink",
        .dev_groups = devlink_groups,
        .dev_release = devlink_dev_release,
--

2.43.0

#4 lore raw
Quoted 30 lines · Saravana Kannan
Quoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

-Saravana

Quoted 13 lines
Quoted 13 lines
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +0 -0
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/base/core.c +1 -2
-static struct class devlink_class = {
+static const struct class devlink_class = {
        .name = "devlink",
        .dev_groups = devlink_groups,
        .dev_release = devlink_dev_release,
--

2.43.0

Greg, can you pick this one up please?

Bart

#5 lore raw
Quoted 31 lines · Bartosz Golaszewski
Quoted 30 lines · Saravana Kannan
Quoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The devlink class object is never modified and can be made constant.

-Saravana

Quoted 13 lines
Quoted 13 lines
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/core.c +0 -0
index a84a7b952cfd..0e618d675792 100644
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/base/core.c +1 -2
-static struct class devlink_class = {
+static const struct class devlink_class = {
        .name = "devlink",
        .dev_groups = devlink_groups,
        .dev_release = devlink_dev_release,
--

2.43.0

Greg, can you pick this one up please?

I will, give me time for trivial stuff like this please, lots of travel and "other" things happening right now (i.e. my INBOX is trashed.)

Will be able to hopefully catch up by the end of next week if all goes well...

thanks,

greg k-h