Re: [PATCH] x86, mm: add generic kernel/ident mapping helper
From: Yinghai Lu
Date: Thu Dec 27 2012 - 19:33:54 EST
On Thu, Dec 27, 2012 at 10:51 AM, Borislav Petkov <bp@xxxxxxxxx> wrote:
>> +struct mapping_info {
>> + void *(*alloc)(void *);
>
> alloc_page
alloc_page make me feel that it will return struct page *.
>
>> + void *data;
>> + unsigned long flag;
>
> page_flags;
will change to pmd_flags
>
>> + bool kernel;
>
> kernel_space?
that is used to tell: if it is kernel mapping or ident mapping.
will change to is_kernel_mapping or kernel_mapping instead
>
> In general, all those members could use more meaningful names and some
> commenting explaining what they are, instead of people having to deduce
> what they mean from their usage in the code.
>
> Also, struct name 'mapping_info' is too generic. Maybe
> ident_mapping_info?
do you like to name it with kernel_ident_mapping_info ?
looks too long.
--
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/