v4.8 remaining ARM warning fixes
Subsystems (2)
cover v4.8 remaining ARM warning fixes
Hi Andrew,
The various build bots that send reports to [email protected] have an almost clean build now, here are the last three patches we need to fix the warnings in v4.8, see also:
https://kernelci.org/build/mainline/kernel/v4.8-rc3-201-gaf56ff27eba5/
There is also a build error for one ARM machine that is fixed in newer gcc versions (to be updated), and we just got a regression in drivers/clocksource/timer-atmel-pit.c in -rc4 that I expect to get fixed through the clocksource tree soon.
Can you pick up these three patches and forward them for inclusion in v4.8? All other v4.8 warning patches I sent last time got picked up already by the respective maintainers, but these don't seem to have a maintainer who wants to apply them.
Arnd Bergmann (1):
kconfig: tinyconfig: provide whole choice blocks to avoid warnings
Geert Uytterhoeven (2):
test/hash: Fix warning in two-dimensional array init test/hash: Fix warning in preprocessor symbol evaluation
arch/x86/configs/tiny.config | 2 ++ kernel/configs/tiny.config | 8 ++++++++ lib/test_hash.c | 26 ++++++++++++++++---------- 3 files changed, 26 insertions(+), 10 deletions(-)
Signature · 1 line
2.9.0
PATCH 1/3 kconfig: tinyconfig: provide whole choice blocks to avoid warnings
Using "make tinyconfig" produces a couple of annoying warnings that show up for build test machines all the time:
.config:966:warning: override: NOHIGHMEM changes choice state .config:965:warning: override: SLOB changes choice state .config:963:warning: override: KERNEL_XZ changes choice state .config:962:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state .config:933:warning: override: SLOB changes choice state .config:930:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state .config:870:warning: override: SLOB changes choice state .config:868:warning: override: KERNEL_XZ changes choice state .config:867:warning: override: CC_OPTIMIZE_FOR_SIZE changes choice state
I've made a previous attempt at fixing them and we discussed a number of alternatives.
I tried changing the Makefile to use "merge_config.sh -n $(fragment-list)" but couldn't get that to work properly.
This is yet another approach, based on the observation that we do want to see a warning for conflicting 'choice' options, and that we can simply make them non-conflicting by listing all other options as disabled. This is a trivial patch that we can apply independent of plans for other changes.
https://patchwork.kernel.org/patch/9212749/
---
This version incorporates feedback from Masahiro Yamada, and includes the x86 change that Josh mentioned
--- arch/x86/configs/tiny.config | 2 ++ kernel/configs/tiny.config | 8 ++++++++ 2 files changed, 10 insertions(+)
arch/x86/configs/tiny.config +2 -0
@@ -1 +1,3 @@ CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set
kernel/configs/tiny.config +8 -0
@@ -1,4 +1,12 @@ +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set CONFIG_OPTIMIZE_INLINING=y +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set CONFIG_SLOB=y
Signature · 1 line
2.9.0
PATCH 2/3 test/hash: Fix warning in two-dimensional array init
In reply to Arnd BergmannFrom: Geert Uytterhoeven <[email protected]>
lib/test_hash.c: In function 'test_hash_init':lib/test_hash.c:146:2: warning: missing braces around initializer [-Wmissing-braces]
--- lib/test_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_hash.c +1 -1
@@ -143,7 +143,7 @@ static int __inittest_hash_init (void) {char buf[SIZE +1 ]; -u32 string_or =0 , hash_or[2 ][33 ] = {0 }; +u32 string_or =0 , hash_or[2 ][33 ] = { {0 , } };unsigned tests =0 ;unsigned long long h64 =0 ;int i, j;
Signature · 1 line
2.9.0
PATCH 3/3 test/hash: Fix warning in preprocessor symbol evaluation
In reply to Arnd BergmannFrom: Geert Uytterhoeven <[email protected]>
Some versions of gcc don't like tests for the value of an undefined preprocessor symbol, even in the #else branch of an #ifndef:
lib/test_hash.c:224:7: warning: "HAVE_ARCH__HASH_32" is not defined [-Wundef]
#elif HAVE_ARCH__HASH_32 != 1
^
lib/test_hash.c:229:7: warning: "HAVE_ARCH_HASH_32" is not defined [-Wundef]
#elif HAVE_ARCH_HASH_32 != 1
^
lib/test_hash.c:234:7: warning: "HAVE_ARCH_HASH_64" is not defined [-Wundef]
#elif HAVE_ARCH_HASH_64 != 1
^Seen with gcc 4.9, not seen with 4.1.2.
Change the logic to only check the value inside an #ifdef to fix this.
--- lib/test_hash.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
lib/test_hash.c +15 -9
@@ -219,21 +219,27 @@ test_hash_init(void) }/* Issue notices about skipped tests. */ -#ifndef HAVE_ARCH__HASH_32 -pr_info ("__hash_32() has no arch implementation to test." ); -#elif HAVE_ARCH__HASH_32 !=1 +#ifdef HAVE_ARCH__HASH_32 +#if HAVE_ARCH__HASH_32 !=1 pr_info ("__hash_32() is arch-specific; not compared to generic." );#endif -#ifndef HAVE_ARCH_HASH_32 -pr_info ("hash_32() has no arch implementation to test." ); -#elif HAVE_ARCH_HASH_32 !=1 +#else +pr_info ("__hash_32() has no arch implementation to test." ); +#endif +#ifdef HAVE_ARCH_HASH_32 +#if HAVE_ARCH_HASH_32 !=1 pr_info ("hash_32() is arch-specific; not compared to generic." );#endif -#ifndef HAVE_ARCH_HASH_64 -pr_info ("hash_64() has no arch implementation to test." ); -#elif HAVE_ARCH_HASH_64 !=1 +#else +pr_info ("hash_32() has no arch implementation to test." ); +#endif +#ifdef HAVE_ARCH_HASH_64 +#if HAVE_ARCH_HASH_64 !=1 pr_info ("hash_64() is arch-specific; not compared to generic." );#endif +#else +pr_info ("hash_64() has no arch implementation to test." ); +#endif pr_notice ("%u tests passed." , tests);
Signature · 1 line
2.9.0