From: Roland Hieber <r.hieber@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Barebox List <barebox@lists.infradead.org>,
Alexander Smirnov <alllecs@yandex.ru>
Subject: Re: common/ddr_spd.c:281:28: warning: bitwise comparison always evaluates to false
Date: Wed, 7 Nov 2018 14:31:26 +0100 [thread overview]
Message-ID: <20181107133126.4gatdtc3bwvr2bvp@pengutronix.de> (raw)
In-Reply-To: <20181101135214.c449c5d63daace2540320652@gmail.com>
On Thu, Nov 01, 2018 at 01:52:14PM +0300, Antony Pavlov wrote:
> Hi!
>
> I have tried to build barebox with gcc-8.2.
>
> I see this warning:
>
> common/ddr_spd.c:281:28:
> common/ddr_spd.c: In function ‘ddr_spd_print’:
> common/ddr_spd.c:281:28: warning: bitwise comparison always evaluates to false [-Wtautological-compare]
> if ((s->mod_ranks & 0x10) == 1)
> ^~
Indeed, selecting only bit 4 will never result in bit 0 being set. Is
this maybe missing a ">> 4"?
- Roland
>
> Git blame show me this:
>
> f75fe31095 (Alexander Smirnov 2015-07-03 18:58:24 +0300 280) printf("%-48s ", "DRAM Package ");
> f75fe31095 (Alexander Smirnov 2015-07-03 18:58:24 +0300 281) if ((s->mod_ranks & 0x10) == 1)
> f75fe31095 (Alexander Smirnov 2015-07-03 18:58:24 +0300 282) printf("Stack\n");
> f75fe31095 (Alexander Smirnov 2015-07-03 18:58:24 +0300 283) else
> f75fe31095 (Alexander Smirnov 2015-07-03 18:58:24 +0300 284) printf("Planar\n");
>
> Please fix it.
>
> --
> Best regards,
> Antony Pavlov
--
Roland Hieber | r.hieber@pengutronix.de |
Pengutronix e.K. | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2018-11-07 13:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 10:52 Antony Pavlov
2018-11-07 13:31 ` Roland Hieber [this message]
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=20181107133126.4gatdtc3bwvr2bvp@pengutronix.de \
--to=r.hieber@pengutronix.de \
--cc=alllecs@yandex.ru \
--cc=antonynpavlov@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