lkml.org 
[lkml]   [2012]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86, mm: add generic kernel/ident mapping helper
From
On Thu, Dec 27, 2012 at 10:51 AM, Borislav Petkov <bp@alien8.de> 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.


\
 
 \ /
  Last update: 2012-12-28 02:01    [W:0.166 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site