History

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.

Damien Le Moal committed 7 years ago

Commit 9305d5d1 parent 36847a01 file · +1 −1Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/elevator.h+1−1
@@ -75,7 +75,7 @@ struct elevator_type · 74 unmodified lines
75 size_t icq_size; /* see iocontext.h */75 size_t icq_size; /* see iocontext.h */
76 size_t icq_align; /* ditto */76 size_t icq_align; /* ditto */
77 struct elv_fs_entry *elevator_attrs;77 struct elv_fs_entry *elevator_attrs;
78 char elevator_name[ELV_NAME_MAX];78 const char *elevator_name;
79 const char *elevator_alias;79 const char *elevator_alias;
80 struct module *elevator_owner;80 struct module *elevator_owner;
81#ifdef CONFIG_BLK_DEBUG_FS81#ifdef CONFIG_BLK_DEBUG_FS

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t