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
On Wed, 06 Feb 2013 09:34:16 +0800 Zhang Yanfei <zhangyanfei@cn.fujitsu.com> wrote:

> >
> >
> > 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?

The sum, the return value. And in the case of nr_free_buffer_pages(),
the signedness of the return value (sheesh). Then review and if
necessary fix up all the callsites. That's all a separate exercise.



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