lkml.org 
[lkml]   [2009]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm: get_nid_for_pfn() returns int
    On Mon, 19 Jan 2009 09:59:19 -0800 Gary Hade <garyhade@us.ibm.com> wrote:

    > On Sun, Jan 18, 2009 at 11:36:28PM +0100, Roel Kluin wrote:
    > > get_nid_for_pfn() returns int
    > >
    > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
    > > ---
    > > vi drivers/base/node.c +256
    > > static int get_nid_for_pfn(unsigned long pfn)
    > >
    > > diff --git a/drivers/base/node.c b/drivers/base/node.c
    > > index 43fa90b..f8f578a 100644
    > > --- a/drivers/base/node.c
    > > +++ b/drivers/base/node.c
    > > @@ -303,7 +303,7 @@ int unregister_mem_sect_under_nodes(struct memory_block *mem_blk)
    > > sect_start_pfn = section_nr_to_pfn(mem_blk->phys_index);
    > > sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1;
    > > for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) {
    > > - unsigned int nid;
    > > + int nid;
    > >
    > > nid = get_nid_for_pfn(pfn);
    > > if (nid < 0)
    >
    > My mistake. Good catch.
    >

    Presumably the (nid < 0) case has never happened.

    Should we retain the test?

    Is silently skipping the node in that case desirable behaviour?


    \
     
     \ /
      Last update: 2009-01-27 07:49    [W:0.026 / U:0.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site