diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-05-30 19:10:00 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-05-30 11:12:43 -0600 |
commit | a378f6a40fac4a2f1812adea7017613d2bd5dab6 (patch) | |
tree | cae324bc09f1bf5d81e8247b6e2b0854f81d8aca | |
parent | 0bd478005cfc7f50ccb769744d952e9687ee75b4 (diff) |
block: constify the whole_disk device_attribute
The struct is never modified so it can be const.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230419-const-partition-v3-4-4e14e48be367@weissschuh.net
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/partitions/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index d5f5633bf725..82d26427deae 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -288,7 +288,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 |