[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180925112016.GZ2555@MiWiFi-R3L-srv>
Date: Tue, 25 Sep 2018 19:20:16 +0800
From: Baoquan He <bhe@...hat.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Lianbo Jiang <lijiang@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
linux-kernel@...r.kernel.org, kexec@...ts.infradead.org,
tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, akpm@...ux-foundation.org,
dan.j.williams@...el.com, thomas.lendacky@....com,
baiyaowei@...s.chinamobile.com, tiwai@...e.de, bp@...e.de,
brijesh.singh@....com, dyoung@...hat.com
Subject: Re: [PATCH 3/3] resource: Fix find_next_iomem_res() iteration issue
On 09/25/18 at 04:58pm, Baoquan He wrote:
> Hi Bjorn,
>
> On 09/24/18 at 05:15pm, Bjorn Helgaas wrote:
> > @@ -359,32 +362,31 @@ static int find_next_iomem_res(struct resource *res, unsigned long desc,
> > read_unlock(&resource_lock);
> > if (!p)
> > return -1;
> > +
> > /* copy data */
> > - if (res->start < p->start)
> > - res->start = p->start;
> > - if (res->end > p->end)
> > - res->end = p->end;
> > + res->start = max(start, p->start);
> > + res->end = min(end, p->end);
> > res->flags = p->flags;
>
> I think this fix is good. However, is it OK to keep res->flags always,
> never touch it in find_next_iomem_res()? We just iterate and update
> region, its start and end. So just removing that "res->flags = p->flags;"
> line might involve much less code changes.
Rethink about it, I was wrong. Please ignore my comment.
Powered by blists - more mailing lists