Skip to content

Commit 9305d5d

Browse files
damien-lemoalaxboe
authored andcommitted
block: Fix elevator name declaration
The elevator_name field in struct elevator_type is declared as an array of characters (ELV_NAME_MAX size) but in practice used as a string pointer with its initialization done statically within each elevator elevator_type structure declaration. Change the declaration of elevator_name to the more appropriate "const char *" type. Acked-by: Marcos Paulo de Souza <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 36847a0 commit 9305d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/elevator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct elevator_type
7575
size_t icq_size; /* see iocontext.h */
7676
size_t icq_align; /* ditto */
7777
struct elv_fs_entry *elevator_attrs;
78-
char elevator_name[ELV_NAME_MAX];
78+
const char *elevator_name;
7979
const char *elevator_alias;
8080
struct module *elevator_owner;
8181
#ifdef CONFIG_BLK_DEBUG_FS

0 commit comments

Comments
 (0)