lkml.org 
[lkml]   [2014]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] bug fix for devicetree memory parsing
On Sun, Jul 6, 2014 at 8:24 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Sun, Jul 6, 2014 at 2:37 AM, Grant Likely <grant.likely@linaro.org> wrote:
>>
>> Can you pull this bug fix into your tree please?
>
> I took it, but I think both your explanation and the patch itself is
> actually crap. It may fix the issue, but it's seriously confused.
>
> Your explanation says that it's a 32-bit platform issue. No it's not.
> Most 32-bit configurations still have a 64-bit phys_addr_t (ie
> PAE/LPAE etc).
>
> And the code is crap, because it uses ULONG_MAX etc in ways that
> simply make no f*cking sense. And why does it care about sizeof?
>
> Why does the code not just do something like
>
> #define MAX_PHYS_ADDR ((phys_addr_t) ~0)
>
> and then do
>
> if (base > MAX_PHYS_ADDR || base + size > MAX_PHYS_ADDR)
> ...

Sure. I'll make sure a cleanup patch gets written and queued up.

g.


\
 
 \ /
  Last update: 2014-07-07 03:21    [W:0.048 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site