From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation
Date: Sun, 15 Apr 2018 20:27:58 +0200 [thread overview]
Message-ID: <20180415182758.2gvkmxp7e5zzxtev@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqFkU=9aPg9xr3gbmApgx-rSfM3toH3m-Br3=PjN1Voqvw@mail.gmail.com>
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@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. Given that the LHS uses some characteristics
of the binary representation I slightly prefer (u32)-1, but I can change
it to U32_MAX, too.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-04-15 18:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 23:30 [PATCH 1/4] pci: rename variable mask -> barval Uwe Kleine-König
2018-04-13 23:30 ` [PATCH 2/4] pci: refactor bar configuration Uwe Kleine-König
2018-04-13 23:30 ` [PATCH 3/4] pci: improve debug output Uwe Kleine-König
2018-04-13 23:58 ` Uwe Kleine-König
2018-04-13 23:30 ` [PATCH 4/4] pci: don't hide hard to understand sanity check in size calculation Uwe Kleine-König
2018-04-14 16:25 ` Andrey Smirnov
2018-04-15 18:27 ` Uwe Kleine-König [this message]
2018-04-16 13:42 ` Andrey Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180415182758.2gvkmxp7e5zzxtev@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox