Re: [PATCH] libfdt: Fix signedness comparison warnings
On Fri, Oct 16, 2020 at 03:42:50PM +0100, Andre Przywara wrote: > This is a combination of upstream libfdt commits to fix warnings about > comparing signed and unsigned integers: > == > scripts/dtc/libfdt/fdt.c: In function ‘fdt_offset_ptr’: > scripts/dtc/libfdt/fdt.c:137:18: warning: comparison between signed and > unsigned integer expressions [-Wsign-compare] >if ((absoffset < offset) > ... > == > > For a detailed description of the fixes, see the dtc repo: > https://git.kernel.org/pub/scm/utils/dtc/dtc.git/log/?id=73e0f143b73d808 > > For this patch the commits between 73e0f143b73d8088 and ca19c3db2bf62000 > have been combined and adjusted for the slight differences in U-Boot's > libfdt code base. > > Signed-off-by: Andre Przywara So, I've applied this to u-boot/master now. These warnings do show up with gcc-10 and it's worthwhile to silence them. I'm working with upstream dtc now so that when we resync next we'll be able to avoid the size and performance penalties of making all fdt loads unaligned safe. A further resync will also require us to fixup a number of dts warnings again. These are the main reasons that I'm setting aside my suggestion of a full resync for now. Thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH] libfdt: Fix signedness comparison warnings
On Fri, Oct 16, 2020 at 10:57:19AM -0400, Tom Rini wrote: > On Fri, Oct 16, 2020 at 03:42:50PM +0100, Andre Przywara wrote: > > > This is a combination of upstream libfdt commits to fix warnings about > > comparing signed and unsigned integers: > > == > > scripts/dtc/libfdt/fdt.c: In function ‘fdt_offset_ptr’: > > scripts/dtc/libfdt/fdt.c:137:18: warning: comparison between signed and > > unsigned integer expressions [-Wsign-compare] > >if ((absoffset < offset) > > ... > > == > > > > For a detailed description of the fixes, see the dtc repo: > > https://git.kernel.org/pub/scm/utils/dtc/dtc.git/log/?id=73e0f143b73d808 > > > > For this patch the commits between 73e0f143b73d8088 and ca19c3db2bf62000 > > have been combined and adjusted for the slight differences in U-Boot's > > libfdt code base. > > > > Signed-off-by: Andre Przywara > > So, the scripts that the Linux kernel uses to re-sync with dtc also work > for U-Boot. Has the kernel re-synced yet? If so, can we just re-sync > with that same commit again? That's typically how we do this. Thanks! I see that it has. So I'll give a re-sync a try and see what comes up. Thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH] libfdt: Fix signedness comparison warnings
On Fri, Oct 16, 2020 at 03:42:50PM +0100, Andre Przywara wrote: > This is a combination of upstream libfdt commits to fix warnings about > comparing signed and unsigned integers: > == > scripts/dtc/libfdt/fdt.c: In function ‘fdt_offset_ptr’: > scripts/dtc/libfdt/fdt.c:137:18: warning: comparison between signed and > unsigned integer expressions [-Wsign-compare] >if ((absoffset < offset) > ... > == > > For a detailed description of the fixes, see the dtc repo: > https://git.kernel.org/pub/scm/utils/dtc/dtc.git/log/?id=73e0f143b73d808 > > For this patch the commits between 73e0f143b73d8088 and ca19c3db2bf62000 > have been combined and adjusted for the slight differences in U-Boot's > libfdt code base. > > Signed-off-by: Andre Przywara So, the scripts that the Linux kernel uses to re-sync with dtc also work for U-Boot. Has the kernel re-synced yet? If so, can we just re-sync with that same commit again? That's typically how we do this. Thanks! -- Tom signature.asc Description: PGP signature