mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] driver core: constify devlink class
@ 2024-10-14 12:28 Bartosz Golaszewski
  2024-10-24 19:08 ` Bartosz Golaszewski
  2024-10-24 19:45 ` Rafael J. Wysocki
  0 siblings, 2 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-10-14 12:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J . Wysocki, Saravana Kannan
  Cc: linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index a84a7b952cfd..0e618d675792 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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


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

end of thread, other threads:[~2024-11-01  0:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 12:28 [PATCH] driver core: constify devlink class Bartosz Golaszewski
2024-10-24 19:08 ` Bartosz Golaszewski
2024-10-24 19:45 ` Rafael J. Wysocki
2024-10-24 19:54   ` Saravana Kannan
2024-10-31 12:31     ` Bartosz Golaszewski
2024-11-01  0:39       ` Greg Kroah-Hartman

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

all inboxes | Powered by JetHome®