linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] v4.8 remaining ARM warning fixes
@ 2016-08-29 21:49 Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 1/3] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-08-29 21:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel-build-reports, linux-kernel, Arnd Bergmann,
	George Spelvin, Ingo Molnar, Josh Triplett, Masahiro Yamada,
	Geert Uytterhoeven

Hi Andrew,

The various build bots that send reports to kernel-build-reports@lists.linaro.org
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(-)

Cc: George Spelvin <linux@sciencehorizons.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
-- 
2.9.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  2016-08-29 21:49 [PATCH 0/3] v4.8 remaining ARM warning fixes Arnd Bergmann
@ 2016-08-29 21:49 ` Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 2/3] test/hash: Fix warning in two-dimensional array init Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 3/3] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-08-29 21:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kernel-build-reports, linux-kernel, Arnd Bergmann

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://storage.kernelci.org/mainline/v4.7-rc6/x86-tinyconfig/build.log
https://patchwork.kernel.org/patch/9212749/
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
---
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(+)

diff --git a/arch/x86/configs/tiny.config b/arch/x86/configs/tiny.config
index 4e2ecfa23c15..4b429df40d7a 100644
--- a/arch/x86/configs/tiny.config
+++ b/arch/x86/configs/tiny.config
@@ -1 +1,3 @@
 CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
diff --git a/kernel/configs/tiny.config b/kernel/configs/tiny.config
index c2de56ab0fce..7fa0c4ae6394 100644
--- a/kernel/configs/tiny.config
+++ b/kernel/configs/tiny.config
@@ -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
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] test/hash: Fix warning in two-dimensional array init
  2016-08-29 21:49 [PATCH 0/3] v4.8 remaining ARM warning fixes Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 1/3] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
@ 2016-08-29 21:49 ` Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 3/3] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-08-29 21:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel-build-reports, linux-kernel, Geert Uytterhoeven, Arnd Bergmann

From: Geert Uytterhoeven <geert@linux-m68k.org>

lib/test_hash.c: In function 'test_hash_init':
lib/test_hash.c:146:2: warning: missing braces around initializer [-Wmissing-braces]

Fixes: 468a9428521e7d00 ("<linux/hash.h>: Add support for architecture-specific functions")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: George Spelvin <linux@sciencehorizons.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/test_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_hash.c b/lib/test_hash.c
index 66c5fc8351e8..81702ee4c41c 100644
--- a/lib/test_hash.c
+++ b/lib/test_hash.c
@@ -143,7 +143,7 @@ static int __init
 test_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;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] test/hash: Fix warning in preprocessor symbol evaluation
  2016-08-29 21:49 [PATCH 0/3] v4.8 remaining ARM warning fixes Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 1/3] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
  2016-08-29 21:49 ` [PATCH 2/3] test/hash: Fix warning in two-dimensional array init Arnd Bergmann
@ 2016-08-29 21:49 ` Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-08-29 21:49 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kernel-build-reports, linux-kernel, Geert Uytterhoeven, Arnd Bergmann

From: Geert Uytterhoeven <geert@linux-m68k.org>

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.

Fixes: 468a9428521e7d00 ("<linux/hash.h>: Add support for architecture-specific functions")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: George Spelvin <linux@sciencehorizons.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/test_hash.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/lib/test_hash.c b/lib/test_hash.c
index 81702ee4c41c..cac20c5fb304 100644
--- a/lib/test_hash.c
+++ b/lib/test_hash.c
@@ -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);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-29 21:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 21:49 [PATCH 0/3] v4.8 remaining ARM warning fixes Arnd Bergmann
2016-08-29 21:49 ` [PATCH 1/3] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
2016-08-29 21:49 ` [PATCH 2/3] test/hash: Fix warning in two-dimensional array init Arnd Bergmann
2016-08-29 21:49 ` [PATCH 3/3] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).