From: Damien Le Moal Date: Wed, 10 Jul 2019 15:57:41 +0000 (+0900) Subject: block: Fix elevator name declaration X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9305d5d721f2bd5e2eeb670035159b560ca211ca;p=linux.git 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 Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe --- diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 38590c30a11d2..17cd0078377ca 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -75,7 +75,7 @@ struct elevator_type size_t icq_size; /* see iocontext.h */ size_t icq_align; /* ditto */ struct elv_fs_entry *elevator_attrs; - char elevator_name[ELV_NAME_MAX]; + const char *elevator_name; const char *elevator_alias; struct module *elevator_owner; #ifdef CONFIG_BLK_DEBUG_FS