Re: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-30 Thread Vineet Gupta
On 11/30/2016 06:21 AM, Yuriy Kolerov wrote: >> On Tue 29-11-16 18:29:06, Yuriy Kolerov wrote: >>> > > Despite the fact that subtraction of unsigned integers is a defined >>> > > behaviour however such operations can lead to unexpected results. Thus >>> > > it is better to check both left and right

RE: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-30 Thread Yuriy Kolerov
> -Original Message- > From: Michal Hocko [mailto:mho...@kernel.org] > Sent: Wednesday, November 30, 2016 12:17 PM > To: Yuriy Kolerov > Cc: linux-snps-arc@lists.infradead.org; vineet.gup...@synopsys.com; > alexey.brod...@synopsys.com; linux-ker...@vger.kernel.org > Subject: Re: [RFC] ARC:

Re: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-30 Thread Michal Hocko
On Tue 29-11-16 18:29:06, Yuriy Kolerov wrote: > Despite the fact that subtraction of unsigned integers is a defined > behaviour however such operations can lead to unexpected results. Thus > it is better to check both left and right boundaries to avoid potential > bugs as it done in the generic pa