diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2020-06-23 20:59:20 -0700 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-06-30 14:38:00 +1000 |
commit | df4232d96e724d09e54a623362f9f610727f059f (patch) | |
tree | 7489e2604f69391b04905162eb38034079f463c6 /arch/powerpc/boot/ps3.c | |
parent | 1addb6444791f9e87fce0eb9882ec96a4a76e615 (diff) | |
download | linux-df4232d96e724d09e54a623362f9f610727f059f.tar.gz linux-df4232d96e724d09e54a623362f9f610727f059f.tar.bz2 linux-df4232d96e724d09e54a623362f9f610727f059f.zip |
powerpc/boot: Use address-of operator on section symbols
Clang warns:
arch/powerpc/boot/main.c:107:18: warning: array comparison always
evaluates to a constant [-Wtautological-compare]
if (_initrd_end > _initrd_start) {
^
arch/powerpc/boot/main.c:155:20: warning: array comparison always
evaluates to a constant [-Wtautological-compare]
if (_esm_blob_end <= _esm_blob_start)
^
2 warnings generated.
These are not true arrays, they are linker defined symbols, which are
just addresses. Using the address of operator silences the warning
and does not change the resulting assembly with either clang/ld.lld
or gcc/ld (tested with diff + objdump -Dr).
Reported-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200624035920.835571-1-natechancellor@gmail.com
Diffstat (limited to 'arch/powerpc/boot/ps3.c')
-rw-r--r-- | arch/powerpc/boot/ps3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index c52552a681c5..6e4efbdb6b7c 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c @@ -127,7 +127,7 @@ void platform_init(void) ps3_repository_read_rm_size(&rm_size); dt_fixup_memory(0, rm_size); - if (_initrd_end > _initrd_start) { + if (&_initrd_end > &_initrd_start) { setprop_val(chosen, "linux,initrd-start", (u32)(_initrd_start)); setprop_val(chosen, "linux,initrd-end", (u32)(_initrd_end)); } |