diff mbox series

[v2,4/4] block: constify the whole_disk device_attribute

Message ID 20230419-const-partition-v2-4-817b58f85cd1@weissschuh.net (mailing list archive)
State New, archived
Headers show
Series block: constify some structures of partitions/core.c | expand

Commit Message

Thomas Weißschuh April 19, 2023, 1:22 p.m. UTC
The struct is never modified so it can be const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 block/partitions/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/block/partitions/core.c b/block/partitions/core.c
index cb37ac71868e..302ac06708e6 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -296,7 +296,7 @@  static ssize_t whole_disk_show(struct device *dev,
 {
 	return 0;
 }
-static DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
+static const DEVICE_ATTR(whole_disk, 0444, whole_disk_show, NULL);
 
 /*
  * Must be called either with open_mutex held, before a disk can be opened or