lkml.org 
[lkml]   [2013]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] mm: rename confusing function names
于 2013年02月06日 09:20, Andrew Morton 写道:
> On Wed, 06 Feb 2013 09:06:05 +0800
> Zhang Yanfei <zhangyanfei@cn.fujitsu.com> wrote:
>
>> So could I rename the functions to the names like
>> nr_available_buffer_high_pages
>> And accurately document them with code comments just as you suggested.
>
> gee. "available" implies "available for you to allocate". It has the
> same problem as "free".
>
> And "buffer" shouldn't be there - that's a reflection of the fact
> that buffer_head payloads are not allocated from highmem. An archaic
> irrelevant thing.
>
> Seriously, first let's write down the descriptions of what these
> functions *do*. Then choose nice names which abbreviate that.
>

OK, I will try to do this.

>
>
> hm,
>
> static unsigned int nr_free_zone_pages(int offset)
> {
> ...
> unsigned int sum = 0;
> ...
> return sum;
> }
>
> How long will it be until these things start exploding from
> sums-of-zones which exceed 16TB?
>

You mean overflow? Hmm.. it might happens. Change the sum to
unsigned long is ok?

Thanks
Zhang Yanfei

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

\
 
 \ /
  Last update: 2013-02-06 03:21    [W:0.051 / U:1.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site