Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-08-03 Thread Geert Uytterhoeven
Hi Michael, On Mon, Aug 3, 2020 at 1:09 PM Michael Ellerman wrote: > Geert Uytterhoeven writes: > > On Mon, Jul 20, 2020 at 11:03 PM Segher Boessenkool > > wrote: > >> On Sat, Jul 18, 2020 at 09:50:50AM +0200, Geert Uytterhoeven wrote: > >> > On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-08-03 Thread Michael Ellerman
Geert Uytterhoeven writes: > On Mon, Jul 20, 2020 at 11:03 PM Segher Boessenkool > wrote: >> On Sat, Jul 18, 2020 at 09:50:50AM +0200, Geert Uytterhoeven wrote: >> > On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor >> > wrote: >> > > /* If we have an image attached to us, it overrides

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-08-03 Thread Geert Uytterhoeven
Hi Segher, On Mon, Jul 20, 2020 at 11:03 PM Segher Boessenkool wrote: > On Sat, Jul 18, 2020 at 09:50:50AM +0200, Geert Uytterhoeven wrote: > > On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor > > wrote: > > > /* If we have an image attached to us, it overrides anything > > >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-20 Thread Segher Boessenkool
Hi! On Sat, Jul 18, 2020 at 09:50:50AM +0200, Geert Uytterhoeven wrote: > On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor > wrote: > > /* If we have an image attached to us, it overrides anything > > * supplied by the loader. */ > > - if (_initrd_end > _initrd_start) { >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-18 Thread Nathan Chancellor
On Sat, Jul 18, 2020 at 09:50:50AM +0200, Geert Uytterhoeven wrote: > Hi Nathan, > > On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor > wrote: > > arch/powerpc/boot/main.c:107:18: warning: array comparison always > > evaluates to a constant [-Wtautological-compare] > > if (_initrd_end >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-18 Thread Arnd Bergmann
On Thu, Jun 25, 2020 at 6:32 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Wed, Jun 24, 2020 at 6:19 PM Geoff Levand wrote: > > > > Hi Nathan, > > > > On 6/23/20 8:59 PM, Nathan Chancellor wrote: > > > These are not true arrays, they are linker defined symbols, which are > > > just

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-18 Thread Geert Uytterhoeven
Hi Nathan, On Wed, Jun 24, 2020 at 6:02 AM Nathan Chancellor wrote: > 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:

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-07-16 Thread Michael Ellerman
On Tue, 23 Jun 2020 20:59:20 -0700, Nathan Chancellor wrote: > Clang warns: > > arch/powerpc/boot/main.c:107:18: warning: array comparison always > evaluates to a constant [-Wtautological-compare] > if (_initrd_end > _initrd_start) { > ^ >

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-06-25 Thread Nick Desaulniers
On Wed, Jun 24, 2020 at 6:19 PM Geoff Levand wrote: > > Hi Nathan, > > On 6/23/20 8:59 PM, Nathan Chancellor wrote: > > 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

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-06-24 Thread Nathan Chancellor
Hi Geoff, On Wed, Jun 24, 2020 at 06:18:48PM -0700, Geoff Levand wrote: > Hi Nathan, > > On 6/23/20 8:59 PM, Nathan Chancellor wrote: > > 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

Re: [PATCH] powerpc/boot: Use address-of operator on section symbols

2020-06-24 Thread Geoff Levand
Hi Nathan, On 6/23/20 8:59 PM, Nathan Chancellor wrote: > 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