[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4898e064-5298-6a82-83ea-23d16f3dfb3d@intel.com>
Date: Fri, 25 Jan 2019 13:09:57 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dan Williams <dan.j.williams@...el.com>,
Dave Jiang <dave.jiang@...el.com>, zwisler@...nel.org,
vishal.l.verma@...el.com, thomas.lendacky@....com,
Andrew Morton <akpm@...ux-foundation.org>, mhocko@...e.com,
linux-nvdimm@...ts.01.org, linux-mm@...ck.org,
Huang Ying <ying.huang@...el.com>,
Wu Fengguang <fengguang.wu@...el.com>,
Borislav Petkov <bp@...e.de>, baiyaowei@...s.chinamobile.com,
Takashi Iwai <tiwai@...e.de>,
Jerome Glisse <jglisse@...hat.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH 1/5] mm/resource: return real error codes from walk
failures
On 1/25/19 1:02 PM, Bjorn Helgaas wrote:
>> @@ -453,7 +453,7 @@ int walk_system_ram_range(unsigned long
>> unsigned long flags;
>> struct resource res;
>> unsigned long pfn, end_pfn;
>> - int ret = -1;
>> + int ret = -EINVAL;
> Can you either make a similar change to the powerpc version of
> walk_system_ram_range() in arch/powerpc/mm/mem.c or explain why it's
> not needed? It *seems* like we'd want both versions of
> walk_system_ram_range() to behave similarly in this respect.
Sure. A quick grep shows powerpc being the only other implementation.
I'll just add this hunk:
> diff -puN arch/powerpc/mm/mem.c~memory-hotplug-walk_system_ram_range-returns-neg-1 arch/powerpc/mm/mem.c
> --- a/arch/powerpc/mm/mem.c~memory-hotplug-walk_system_ram_range-returns-neg-1 2019-01-25 12:57:00.000004446 -0800
> +++ b/arch/powerpc/mm/mem.c 2019-01-25 12:58:13.215004263 -0800
> @@ -188,7 +188,7 @@ walk_system_ram_range(unsigned long star
> struct memblock_region *reg;
> unsigned long end_pfn = start_pfn + nr_pages;
> unsigned long tstart, tend;
> - int ret = -1;
> + int ret = -EINVAL;
I'll also dust off the ol' cross-compiler and make sure I didn't
fat-finger anything.
Powered by blists - more mailing lists