Re: [PATCH] elevator.c: use ELV_NAME_MAX instead of magic number16 for chosen_elevator

From: Jens Axboe
Date: Thu Sep 08 2011 - 06:32:43 EST


On 2011-09-08 06:23, Wang Sheng-Hui wrote:
> On 2011å09æ04æ 21:22, Wang Sheng-Hui wrote:
>> 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.
>>
>> Signed-off-by: Wang Sheng-Hui <shhuiw@xxxxxxxxx>
>> ---
>> block/elevator.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/block/elevator.c b/block/elevator.c
>> index a3b64bc..cb332cb 100644
>> --- a/block/elevator.c
>> +++ b/block/elevator.c
>> @@ -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?

Looks fine, applied.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/