public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Pull request: u-boot-mips
Date: Mon, 17 Jul 2017 21:07:59 -0400	[thread overview]
Message-ID: <20170718010759.GC14320@bill-the-cat> (raw)
In-Reply-To: <6306411.FTGR7MSTNJ@np-p-burton>

On Thu, Jul 13, 2017 at 10:58:47AM -0700, Paul Burton wrote:
> Hi Daniel & Tom,
> 
> On Thursday, 13 July 2017 03:51:00 PDT Daniel Schwierzeck wrote:
> > Hi Paul,
> > 
> > 2017-07-13 2:33 GMT+02:00 Tom Rini <trini@konsulko.com>:
> > > On Wed, Jul 12, 2017 at 04:57:42PM -0400, Tom Rini wrote:
> > >> On Wed, Jul 12, 2017 at 10:32:29PM +0200, Daniel Schwierzeck wrote:
> > >> > Hi Tom,
> > >> > 
> > >> > This supports dynamic relocation on MIPS without the need for building
> > >> > a
> > >> > position-independent executable. This notably reduces the code size for
> > >> > all MIPS boards.
> > >> > 
> > >> > The following changes since commit 
> d85ca029f257b53a96da6c2fb421e78a003a9943:
> > >> >   Prepare v2017.07 (2017-07-10 13:07:38 -0400)
> > >> > 
> > >> > are available in the git repository at:
> > >> >   git://git.denx.de/u-boot-mips.git master
> > >> > 
> > >> > for you to fetch changes up to 
> f653dcd5720c4135607211f7304283d7a8ec3b8a:
> > >> >   MIPS: bootm: Fix broken boot_env_legacy codepath (2017-07-12 22:10:42
> > >> >   +0200)>> 
> > >> I'm seeing:
> > >>       mips:  +   tplink_wdr4300
> > >> 
> > >> +(tplink_wdr4300)    pfx##hdr32[idx].field = _val;   \
> > >> +(tplink_wdr4300)                          ^
> > >> +(tplink_wdr4300) ../tools/mips-relocs.c:51:11: note: ?_val? was declared
> > >> here +(tplink_wdr4300)   uint64_t _val;      \
> > >> +(tplink_wdr4300)            ^
> > >> +(tplink_wdr4300) ../tools/mips-relocs.c:88:2: note: in expansion of
> > >> macro ?set_hdr_field? +(tplink_wdr4300)   set_hdr_field(p, idx, field,
> > >> val)
> > >> +(tplink_wdr4300)   ^~~~~~~~~~~~~
> > >> +(tplink_wdr4300) ../tools/mips-relocs.c:408:3: note: in expansion of
> > >> macro ?set_phdr_field? +(tplink_wdr4300)    set_phdr_field(i, p_filesz,
> > >> load_sz);
> > >> +(tplink_wdr4300)    ^~~~~~~~~~~~~~
> > >> w+(tplink_wdr4300) ../tools/mips-relocs.c: In function ?main?:
> > >> w+(tplink_wdr4300) ../tools/mips-relocs.c:77:25: warning: ?_val? may be
> > >> used uninitialized in this function [-Wmaybe-uninitialized]
> > >> 
> > >> for what I suspect is going to be all MIPS.  Host tools here are gcc-6.3.
> > > 
> > > Yeah, this is all MIPS boards.  Please fix, thanks!
> > 
> > Paul, could you send a follow-up patch to fix this? Thanks.
> 
> Sure. I'm on gcc 7.1.1 which doesn't show this issue. Is the following 
> sufficient to fix this for you Tom? I can submit it as a proper patch if you 
> like & it works out.

Oh?  That it doesn't show up with a newer compiler is interesting...

> Thanks,
>     Paul
> 
> diff --git a/tools/mips-relocs.c b/tools/mips-relocs.c
> index b690fa53c4..75d532546b 100644
> --- a/tools/mips-relocs.c
> +++ b/tools/mips-relocs.c
> @@ -69,6 +69,9 @@
>         case 8:                                                 \
>                 _val = is_be ? htobe64(val) : htole64(val);     \
>                 break;                                          \
> +       default:                                                \
> +               __builtin_unreachable();                        \
> +               break;                                          \
>         }                                                       \

I'm not a huge fan of adding builtin calls like this.  Is there some
other way to restructure the code perhaps, while still being clear?
Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170717/71b8b6ae/attachment.sig>

  reply	other threads:[~2017-07-18  1:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 20:32 [U-Boot] Pull request: u-boot-mips Daniel Schwierzeck
2017-07-12 20:57 ` Tom Rini
2017-07-13  0:33   ` Tom Rini
2017-07-13 10:51     ` Daniel Schwierzeck
2017-07-13 17:58       ` Paul Burton
2017-07-18  1:07         ` Tom Rini [this message]
2017-07-19 12:59           ` Paul Burton
2017-07-19 13:04             ` Tom Rini
2017-07-25 13:38               ` Daniel Schwierzeck
2017-07-25 14:07                 ` [U-Boot] [PATCH] mips-relocs: Fix warning from gcc 6.3 Paul Burton
2017-07-25 14:09                 ` [U-Boot] Pull request: u-boot-mips Paul Burton
2017-07-25 14:07       ` [U-Boot] [PATCH] mips-relocs: Fix warning from gcc 6.3 Paul Burton
2017-07-13 11:05   ` [U-Boot] Pull request: u-boot-mips Daniel Schwierzeck
2017-07-13 12:30     ` Tom Rini
2017-07-25 18:55 ` [U-Boot] Pull request: u-boot-mips v2 Daniel Schwierzeck
2017-07-26 19:52   ` Tom Rini

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=20170718010759.GC14320@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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