Skip to content

Commit 3c91226

Browse files
t-8chaxboe
authored andcommitted
block: ia-ranges: make blk_ia_range_sysfs_entry instances const
The blk_ia_range_sysfs_entry structures are never modified, mark them as const. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: John Garry <[email protected]> Link: https://patch.msgid.link/20260316-b4-sysfs-const-attr-block-v1-2-a35d73b986b0@weissschuh.net Signed-off-by: Jens Axboe <[email protected]>
1 parent 2239838 commit 3c91226

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

block/blk-ia-ranges.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ struct blk_ia_range_sysfs_entry {
3030
ssize_t (*show)(struct blk_independent_access_range *iar, char *buf);
3131
};
3232

33-
static struct blk_ia_range_sysfs_entry blk_ia_range_sector_entry = {
33+
static const struct blk_ia_range_sysfs_entry blk_ia_range_sector_entry = {
3434
.attr = { .name = "sector", .mode = 0444 },
3535
.show = blk_ia_range_sector_show,
3636
};
3737

38-
static struct blk_ia_range_sysfs_entry blk_ia_range_nr_sectors_entry = {
38+
static const struct blk_ia_range_sysfs_entry blk_ia_range_nr_sectors_entry = {
3939
.attr = { .name = "nr_sectors", .mode = 0444 },
4040
.show = blk_ia_range_nr_sectors_show,
4141
};
4242

43-
static struct attribute *blk_ia_range_attrs[] = {
43+
static const struct attribute *const blk_ia_range_attrs[] = {
4444
&blk_ia_range_sector_entry.attr,
4545
&blk_ia_range_nr_sectors_entry.attr,
4646
NULL,

0 commit comments

Comments
 (0)