elevator.c: use ELV_NAME_MAX instead of magic number 16 for chosen_elevator
PATCH 1/1 elevator.c: use ELV_NAME_MAX instead of magic number 16 for chosen_elevator
We have ELV_NAME_MAX defined to 16, and hence we should use it instead of the magic nubmer 16 for elevator's name string.
The patch is against 3.1-rc3.
--- block/elevator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
block/elevator.c +1 -1
@@ -182,7 +182,7 @@ static void elevator_attach(struct request_queue *q, struct elevator_queue *eq, eq->elevator_data = data; } -static char chosen_elevator[16 ]; +static char chosen_elevator[ELV_NAME_MAX ];static int __init elevator_setup (char *str) {
Signature · 1 line
1.7.1
Quoted 15 lines · Wang Sheng-Hui
We have
ELV_NAME_MAXdefined to 16, and hence we should use it instead of the magic nubmer 16 for elevator's name string.The patch is against 3.1-rc3.
Signed-off-by Wang Sheng-Hui <[email protected]>--- block/elevator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)block/elevator.c +0
-0
block/elevator.c static void elevator_attach(struct request_queue *q, struct elevator_queue *eq, · line 188
Quoted 8 lines
block/elevator.c +1
-1@@ -182,7 +182,7 @@ static void elevator_attach(struct request_queue *q, struct elevator_queue *eq, eq->elevator_data = data; } -static char chosen_elevator[16 ]; +static char chosen_elevator[ELV_NAME_MAX ];static int __init elevator_setup (char *str) {
Any comment?
Jens Axboe
maintainerQuoted 19 lines · Wang Sheng-Hui
Quoted 18 lines · Wang Sheng-Hui
We have
ELV_NAME_MAXdefined to 16, and hence we should use it instead of the magic nubmer 16 for elevator's name string.The patch is against 3.1-rc3.
Signed-off-by Wang Sheng-Hui <[email protected]>--- block/elevator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)block/elevator.c +0
-0@@ -182,7 +182,7 @@ static void elevator_attach(struct request_queue *q, struct elevator_queue *eq, eq->elevator_data = data; }
Quoted 7 lines
block/elevator.c static void elevator_attach(struct request_queue *q, struct elevator_queue *eq, · line 188
Quoted 5 lines
block/elevator.c +1
-1-static char chosen_elevator[16 ]; +static char chosen_elevator[ELV_NAME_MAX ];static int __init elevator_setup (char *str) {Any comment?
Looks fine, applied.
Signature · 1 line
Jens Axboe