From: geoff@infradead.org (Geoff Levand)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] efi: Fix free_end build warning
Date: Thu, 13 Nov 2014 11:42:40 -0800 [thread overview]
Message-ID: <1415907760.15847.93.camel@smoke> (raw)
In-Reply-To: <20141113114420.GF13350@arm.com>
Hi Will,
On Thu, 2014-11-13 at 11:44 +0000, Will Deacon wrote:
> Do you have any idea how GCC arrives at this conclusion? I can't see a
> path through that function where we use free_end without initialising it.
I've seen it warn like this before, when it shouldn't. I guess
-Wmaybe-uninitialized makes it more conservative.
Using:
aarch64-linux-gnu-gcc (Ubuntu/Linaro 4.8.2-13ubuntu1) 4.8.2 20140110 (prerelease) [ibm/gcc-4_8-branch merged from gcc-4_8-branch, revision 205847]
> Does something like the patch below help?
Here is the full output, for-next/core gives:
/home/geoff/projects/linaro/git/linux-kexec/arch/arm64/kernel/efi.c:281:31: warning: ?free_end? may be used uninitialized in this function [-Wmaybe-uninitialized]
total_freed += free_region(free_start, free_end);
^
/home/geoff/projects/linaro/git/linux-kexec/arch/arm64/kernel/efi.c:225:28: note: ?free_end? was declared here
u64 keep_end, free_start, free_end;
^
Your mod gives:
/home/geoff/projects/linaro/git/linux-kexec/arch/arm64/kernel/efi.c:279:31: warning: ?free_end? may be used uninitialized in this function [-Wmaybe-uninitialized]
total_freed += free_region(free_start, free_end);
^
/home/geoff/projects/linaro/git/linux-kexec/arch/arm64/kernel/efi.c:225:28: note: ?free_end? was declared here
u64 keep_end, free_start, free_end;
^
So about the same.
-Geoff
next prev parent reply other threads:[~2014-11-13 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 20:27 [PATCH] efi: Fix free_end build warning Geoff Levand
2014-11-13 11:44 ` Will Deacon
2014-11-13 19:42 ` Geoff Levand [this message]
2014-11-14 10:22 ` Will Deacon
2014-11-14 10:29 ` Ard Biesheuvel
2014-11-14 10:35 ` Will Deacon
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=1415907760.15847.93.camel@smoke \
--to=geoff@infradead.org \
--cc=linux-arm-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.