lkml.org 
[lkml]   [2009]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH UPDATED 09/10] percpu: implement new dynamic percpu allocator
    Andrew Morton wrote:
    >> +void *pcpu_base_addr;
    >> +EXPORT_SYMBOL_GPL(pcpu_base_addr);
    >> +
    >> +/* the size of kernel static area */
    >> +static int pcpu_static_size;
    >
    > It would be nice to document the units of the `size' variables. Bytes?
    > Pages?

    I almost always use size for bytes, so it isn't confusing to me.

    > Or, better: s/size/bytes/g.
    >
    >> +static int pcpu_size_to_slot(int size)
    >> +{
    >> + int highbit = fls(size);
    >> + return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1);
    >> +}
    >
    > See,
    >
    > static int pcpu_bytes_to_slot(int bytes)
    > {
    > int highbit = fls(bytes);
    > return max(highbit - PCPU_SLOT_BASE_SHIFT + 2, 1);
    > }
    >
    > is clearer.

    but, yeah, I agree. I'll post a patch to do the renaming.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2009-02-21 04:27    [W:3.505 / U:0.452 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site