[PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation
Andrey Smirnov
andrew.smirnov at gmail.com
Mon Apr 16 06:42:31 PDT 2018
On Sun, Apr 15, 2018 at 11:27 AM, Uwe Kleine-König
<u.kleine-koenig at pengutronix.de> wrote:
> Hello Andrey,
>
> On Sat, Apr 14, 2018 at 09:25:59AM -0700, Andrey Smirnov wrote:
>> On Fri, Apr 13, 2018 at 4:30 PM, Uwe Kleine-König
>> <u.kleine-koenig at pengutronix.de> wrote:
>> > + /*
>> > + * if maxbase isn't in the form 0b1...10...0 there is something
>> > + * fishy
>> > + */
>> > + if ((maxbase | (maxbase - 1)) != (u32)-1 || maxbase == 0) {
>>
>> U32_MAX instead of (u32)-1 ?
>
> I don't feel strong here.
Me neither. I just read (u32)-1 as a shortcut for 0xffffffff and we
already have a shortcut for that. But if you want to keep using
(u32)-1, then by all means.
Thanks,
Andrey Smirnov
More information about the barebox
mailing list