v4.8 build regressions
Subsystems (12)
cover v4.8 build regressions
This is a set of patches to address build warnings and errors that have come up in linux-4.8 but that worked fine in v4.7. I've added the tinyconfig warning patch in there as well, which is not a regression but is something that shows up in the kernelci.org build bots. The other patches address issues that either came up in kernelci.org or in my randconfig test setup.
I have three more fixes queued up in arm-soc/fixes that I plan to send as a pull request for -rc2 along with the other bugfixes.
All patches have been posted before, but for some reason or another failed to make it into the merge window. I have updated the ones that were waiting for a new version from me now, the others are sent without modifications.
Hopefully we can get them all merged into v4.8. Please pick up patches from the middle of the series if appropriate.
Arnd
Arnd Bergmann (7):
kconfig: tinyconfig: provide whole choice blocks to avoid warnings
dsa: mv88e6xxx: hide unused functions
drm/mediatek: add COMMON_CLK dependency
drm/mediatek: add CONFIG_OF dependency
drm/mediatek: add ARM_SMCCC dependency
clocksource: kona: fix get_counter error handling 8250/fintek: rename IRQ_MODE macro
Geert Uytterhoeven (1):
test/hash: Fix warning in two-dimensional array init
George Spelvin (1):
test/hash: Fix warning in preprocessor symbol evaluation
arch/x86/configs/tiny.config | 2 ++ drivers/clocksource/bcm_kona_timer.c | 16 ++++++++++------ drivers/gpu/drm/mediatek/Kconfig | 3 +++ drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ drivers/tty/serial/8250/8250_fintek.c | 4 ++-- kernel/configs/tiny.config | 8 ++++++++ lib/test_hash.c | 8 ++++---- 7 files changed, 31 insertions(+), 12 deletions(-)
Signature · 24 lines
2.9.0 Cc: Andrew Lunn <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: David Airlie <[email protected]> Cc: dri-devel at lists.freedesktop.org Cc: Geert Uytterhoeven <[email protected]> Cc: George Spelvin <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Ji-Ze Hong (Peter Hong) <[email protected]> Cc: Josh Triplett <[email protected]> Cc: kernel-build-reports at lists.linaro.org Cc: linux-arm-kernel at lists.infradead.org Cc: linux-kernel at vger.kernel.org Cc: Masahiro Yamada <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: netdev at vger.kernel.org Cc: Philipp Zabel <[email protected]> Cc: Ricardo Ribalda Delgado <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vivien Didelot <[email protected]> Cc: x86 at kernel.org
PATCH 2/9 dsa: mv88e6xxx: hide unused functions
When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused functions whose only callers are all inside of an #ifdef:
drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function] drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function]
This adds another ifdef around the function definitions. The warnings appeared after the functions were marked 'static', but the problem was already there before that.
---
When I first submitted it on June 23, there was a clash with some other patches, this version is based on top of current mainline, which contains those patches already, so it should apply cleanly.
--- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
@@ -3187,6 +3187,7 @@ static int mv88e6xxx_set_addr(struct dsa_switch *ds, u8 *addr)return err; } +#ifdef CONFIG_NET_DSA_HWMON static int mv88e6xxx_mdio_page_read (struct dsa_switch *ds,int port,int page,int reg) {
@@ -3212,6 +3213,7 @@ static int mv88e6xxx_mdio_page_write(struct dsa_switch *ds, int port, int page, return ret; } +#endif static int mv88e6xxx_port_to_mdio_addr (struct mv88e6xxx_chip *chip,int port) {
Signature · 1 line
2.9.0
PATCH 3/9 drm/mediatek: add COMMON_CLK dependency
In reply to Arnd BergmannOn kernel builds without COMMON_CLK, the newly added mediatek drm driver fails to build:
drivers/gpu/drm/mediatek/mtk_mipi_tx.c:130:16: error: field 'pll_hw' has incomplete type
struct clk_hw pll_hw;
^~~~~~
In file included from ../include/linux/clk.h:16:0,
from ../drivers/gpu/drm/mediatek/mtk_mipi_tx.c:14:
drivers/gpu/drm/mediatek/mtk_mipi_tx.c: In function 'mtk_mipi_tx_from_clk_hw':
include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
^
/drivers/gpu/drm/mediatek/mtk_mipi_tx.c:136:9: note: in expansion of macro 'container_of'
return container_of(hw, struct mtk_mipi_tx, pll_hw);
^~~~~~~~~~~~drivers/gpu/drm/mediatek/mtk_mipi_tx.c: At top level:drivers/gpu/drm/mediatek/mtk_mipi_tx.c:302:21: error: variable 'mtk_mipi_tx_pll_ops' has initializer but incomplete type
static const struct clk_ops mtk_mipi_tx_pll_ops = {
This adds the required Kconfig dependency.
---
I originally sent this on May 11 2016 after the driver was added with this bug, but my fix never made it in.
--- drivers/gpu/drm/mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/Kconfig +1 -0
@@ -2,6 +2,7 @@ config DRM_MEDIATEK tristate "DRM Support for Mediatek SoCs" depends on DRM depends on ARCH_MEDIATEK || (ARM && COMPILE_TEST) + depends on COMMON_CLK select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER select DRM_MIPI_DSI
Signature · 1 line
2.9.0
PATCH 4/9 drm/mediatek: add CONFIG_OF dependency
In reply to Arnd BergmannThe mediatek DRM driver can be configured for compile testing with CONFIG_OF disabled, but then fails to link:
drivers/gpu/built-in.o: In function `mtk_drm_bind':
analogix_dp_reg.c:(.text+0x52888): undefined reference to of_find_device_by_node' analogix_dp_reg.c:(.text+0x52930): undefined reference to of_find_device_by_node'
This adds an explicit Kconfig dependency.
---
I originally sent this on May 18 when the driver was newly added, but my fix never made it.
--- drivers/gpu/drm/mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_MEDIATEK depends on DRM depends on ARCH_MEDIATEK || (ARM && COMPILE_TEST) depends on COMMON_CLK + depends on OF select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER select DRM_MIPI_DSI
Signature · 1 line
2.9.0
PATCH 5/9 drm/mediatek: add ARM_SMCCC dependency
In reply to Arnd BergmannARM SMCCC is only set for ARMv7 and ARMv8 CPUs, but we currently allow the driver to be build for older architecture levels as well, which results in a link failure:
drivers/gpu/built-in.o: In function `mtk_hdmi_hw_make_reg_writable':
:(.text+0x1e737c): undefined reference to `arm_smccc_smc'
This adds a Kconfig dependency. The patch applies on my two previous fixes that are not yet applied, so please apply all three to get randconfig builds to work correctly.
---
Sent first on June 27 when it first broke in linux-next. Two other dependencies were already missing, so I'm sending all three patches again now.
--- drivers/gpu/drm/mediatek/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_MEDIATEK depends on DRM depends on ARCH_MEDIATEK || (ARM && COMPILE_TEST) depends on COMMON_CLK + depends on HAVE_ARM_SMCCC depends on OF select DRM_GEM_CMA_HELPER select DRM_KMS_HELPER
Signature · 1 line
2.9.0
PATCH 7/9 8250/fintek: rename IRQ_MODE macro
In reply to Arnd BergmannA bugfix for the fintek driver required defining some macros, but one of them clashes with a system header on ARM:
drivers/tty/serial/8250/8250_fintek.c:34:0: error: "IRQ_MODE" redefined [-Werror]
#define IRQ_MODE 0x70
In file included from /git/arm-soc/arch/arm/include/asm/ptrace.h:13:0,
from /git/arm-soc/arch/arm/include/asm/irqflags.h:6,
from /git/arm-soc/include/linux/irqflags.h:15,
from /git/arm-soc/arch/arm/include/asm/bitops.h:27,
from /git/arm-soc/include/linux/bitops.h:36,
from /git/arm-soc/include/linux/kernel.h:10,
from /git/arm-soc/include/linux/list.h:8,
from /git/arm-soc/include/linux/module.h:9,
from /git/arm-soc/drivers/tty/serial/8250/8250_fintek.c:11:arch/arm/include/uapi/asm/ptrace.h:55:0: note: this is the location of the previous definition
This renames the newly introduced 'IRQ_MODE' macro to FINTEK_IRQ_MODE.
---
Originally sent on June 27 when the warning appeared, but for some reason the fix never got picked up.
--- drivers/tty/serial/8250/8250_fintek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/8250/8250_fintek.c +2 -2
@@ -31,7 +31,7 @@#define IO_ADDR2 0x60#define LDN 0x7 -#define IRQ_MODE 0x70 +#define FINTEK_IRQ_MODE 0x70#define IRQ_SHARE BIT(4)#define IRQ_MODE_MASK (BIT(6) | BIT(5))#define IRQ_LEVEL_LOW 0
@@ -195,7 +195,7 @@ static int fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool level_mode)outb (LDN , pdata->base_port +ADDR_PORT );outb (pdata->index, pdata->base_port +DATA_PORT ); -outb (IRQ_MODE , pdata->base_port +ADDR_PORT ); +outb (FINTEK_IRQ_MODE , pdata->base_port +ADDR_PORT ); tmp =inb (pdata->base_port +DATA_PORT ); tmp &= ~IRQ_MODE_MASK ;
Signature · 1 line
2.9.0
PATCH 1/9 kconfig: tinyconfig: provide whole choice blocks to avoid warnings
In reply to Arnd BergmannUsing "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
Unlike the other patches in this series, this is not a recent regression, but it is the only non-regression warning fix I'm aware of that we currently need for a clean build on all configurations tested by
https://kernelci.org/.
--- 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 6/9 clocksource: kona: fix get_counter error handling
In reply to Arnd BergmannI could not figure out why, but gcc cannot prove that the kona_timer_init function always initializes its two outputs, and we get a warning for the use of the 'lsw' variable later, which is obviously correct.
drivers/clocksource/bcm_kona_timer.c: In function 'kona_timer_init':drivers/clocksource/bcm_kona_timer.c:119:13: error: 'lsw' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Slightly reordering the loop makes the warning disappear, after it becomes more obvious to the compiler that the loop is always entered on the first iteration.
As pointed out by Ray Jui, there is a related problem in the way we deal with the loop running into the limit, as we just keep going there with an invalid counter data, so instead we now propagate a -ETIMEDOUT result to the caller.
---
Originally sent this as a warning fix only on June 13, this version actually fixes the incorrect data problem.
--- drivers/clocksource/bcm_kona_timer.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
drivers/clocksource/bcm_kona_timer.c +10 -6
@@ -66,10 +66,10 @@ static void kona_timer_disable_and_clear(void __iomem *base) } -static void +static int kona_timer_get_counter (void __iomem *timer_base,uint32_t *msw,uint32_t *lsw) { -int loop_limit =4 ; +int loop_limit =3 ;/* * Read 64-bit free running counter
@@ -83,18 +83,19 @@ kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw)* if new hi-word is equal to previously read hi-word then stop. */ -while (--loop_limit) { +do { *msw =readl (timer_base +KONA_GPTIMER_STCHI_OFFSET ); *lsw =readl (timer_base +KONA_GPTIMER_STCLO_OFFSET );if (*msw ==readl (timer_base +KONA_GPTIMER_STCHI_OFFSET ))break ; - } + }while (--loop_limit);if (!loop_limit) {pr_err ("bcm_kona_timer: getting counter failed.\n" );pr_err (" Timer will be impacted\n" ); +return -ETIMEDOUT ; } -return ; +return 0 ; } static int kona_timer_set_next_event(unsigned long clc,
@@ -112,8 +113,11 @@ static int kona_timer_set_next_event(unsigned long clc,uint32_t lsw, msw;uint32_t reg; +int ret; -kona_timer_get_counter (timers.tmr_regs, &msw, &lsw); + ret =kona_timer_get_counter (timers.tmr_regs, &msw, &lsw); +if (ret) +return ret;/* Load the "next" event tick value */ writel (lsw + clc, timers.tmr_regs +KONA_GPTIMER_STCM0_OFFSET );
Signature · 1 line
2.9.0
PATCH 8/9 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 9/9 test/hash: Fix warning in preprocessor symbol evaluation
In reply to Arnd BergmannFrom: George Spelvin <[email protected]>
Quoted 2 lines · Geert Uytterhoeven
Some versions of gcc don't like tests for the value of an undefined preprocessor symbol, even in the #else branch of an #ifndef:
Damn, I had hoped that would work universally; I tried to avoid the uglier #if-inside-#ifdef construction. GCC 6 is quite happy wth it.
But no objections.
If you want:
But here's an alternative. Geert, what do you think of this?
--- lib/test_hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/test_hash.c +3 -3
@@ -221,17 +221,17 @@ 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 +#elif HAVE_ARCH__HASH_32 +0 !=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 +#elif HAVE_ARCH_HASH_32 +0 !=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 +#elif HAVE_ARCH_HASH_64 +0 !=1 pr_info ("hash_64() is arch-specific; not compared to generic." );#endif
Signature · 1 line
2.9.0
Re: [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation
Quoted 9 lines · CEST Arnd Bergmann
From: George Spelvin <[email protected]>
Quoted 2 lines · Geert Uytterhoeven
Some versions of gcc don't like tests for the value of an undefined preprocessor symbol, even in the #else branch of an #ifndef:
Damn, I had hoped that would work universally; I tried to avoid the uglier #if-inside-#ifdef construction. GCC 6 is quite happy wth it.
Quoted 7 lines
But no objections.
If you want:
Acked-by George Spelvin <[email protected]>But here's an alternative. Geert, what do you think of this?
Acked-by George Spelvin <[email protected]>
I picked the wrong patch from patchwork, I meant to get
https://patchwork.kernel.org/patch/9139839/ instead, sorry for the mixup. I originally had my own patch in the series and then replaced it with Geert's before sending it out, but got the wrong url.
Arnd
Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling
In reply to Arnd BergmannHi Arnd,
Quoted 70 lines · Arnd Bergmann
I could not figure out why, but gcc cannot prove that the
kona_timer_initfunction always initializes its two outputs, and we get a warning for the use of the 'lsw' variable later, which is obviously correct.
drivers/clocksource/bcm_kona_timer.c: In function 'kona_timer_init':drivers/clocksource/bcm_kona_timer.c:119:13: error: 'lsw' may be used uninitialized in this function [-Werror=maybe-uninitialized]Slightly reordering the loop makes the warning disappear, after it becomes more obvious to the compiler that the loop is always entered on the first iteration.
As pointed out by Ray Jui, there is a related problem in the way we deal with the loop running into the limit, as we just keep going there with an invalid counter data, so instead we now propagate a
-ETIMEDOUTresult to the caller.Signed-off-by Arnd Bergmann <[email protected]>---
Originally sent this as a warning fix only on June 13, this version actually fixes the incorrect data problem.--- drivers/clocksource/bcm_kona_timer.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)drivers/clocksource/bcm_kona_timer.c +6
-5@@ -66,10 +66,10 @@ static void kona_timer_disable_and_clear(void __iomem *base) } -static void +static int kona_timer_get_counter (void __iomem *timer_base,uint32_t *msw,uint32_t *lsw) { -int loop_limit =4 ; +int loop_limit =3 ;/* * Read 64-bit free running counter @@ -83,18 +83,19 @@ kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw)* if new hi-word is equal to previously read hi-word then stop. */ -while (--loop_limit) { +do { *msw =readl (timer_base +KONA_GPTIMER_STCHI_OFFSET ); *lsw =readl (timer_base +KONA_GPTIMER_STCLO_OFFSET );if (*msw ==readl (timer_base +KONA_GPTIMER_STCHI_OFFSET ))break ; - } + }while (--loop_limit);if (!loop_limit) {pr_err ("bcm_kona_timer: getting counter failed.\n" );pr_err (" Timer will be impacted\n" ); +return -ETIMEDOUT ; } -return ; +return 0 ; } static int kona_timer_set_next_event(unsigned long clc,@@ -112,8 +113,11 @@ static int kona_timer_set_next_event(unsigned long clc,uint32_t lsw, msw;
drivers/clocksource/bcm_kona_timer.c static int kona_timer_set_next_event(unsigned long clc, · line 123
Quoted 10 lines
drivers/clocksource/bcm_kona_timer.c +4
-1uint32_t reg; +int ret; -kona_timer_get_counter (timers.tmr_regs, &msw, &lsw); + ret =kona_timer_get_counter (timers.tmr_regs, &msw, &lsw); +if (ret) +return ret;/* Load the "next" event tick value */ writel (lsw + clc, timers.tmr_regs +KONA_GPTIMER_STCM0_OFFSET );
The change looks good to me! Thanks!
Philipp Zabel
maintainerAm Mittwoch, den 10.08.2016, 23:54 +0200 schrieb Arnd Bergmann:
Quoted 18 lines
This is a set of patches to address build warnings and errors that have come up in linux-4.8 but that worked fine in v4.7. I've added the tinyconfig warning patch in there as well, which is not a regression but is something that shows up in the kernelci.org build bots. The other patches address issues that either came up in kernelci.org or in my randconfig test setup.
I have three more fixes queued up in arm-soc/fixes that I plan to send as a pull request for -rc2 along with the other bugfixes.
All patches have been posted before, but for some reason or another failed to make it into the merge window. I have updated the ones that were waiting for a new version from me now, the others are sent without modifications.
Hopefully we can get them all merged into v4.8. Please pick up patches from the middle of the series if appropriate.
Quoted 8 lines
Arnd
Arnd Bergmann (7):
kconfig: tinyconfig: provide whole choice blocks to avoid warnings
dsa: mv88e6xxx: hide unused functions
drm/mediatek: addCOMMON_CLKdependency
drm/mediatek: addCONFIG_OFdependency
drm/mediatek: addARM_SMCCCdependency
I have picked up the three drm/mediatek patches.
regards
Philipp
Quoted 17 lines
clocksource: kona: fix
get_countererror handling 8250/fintek: renameIRQ_MODEmacroGeert Uytterhoeven (1):
test/hash: Fix warning in two-dimensional array initGeorge Spelvin (1):
test/hash: Fix warning in preprocessor symbol evaluationarch/x86/configs/tiny.config | 2 ++ drivers/clocksource/bcm_kona_timer.c | 16 ++++++++++------ drivers/gpu/drm/mediatek/Kconfig | 3 +++ drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ drivers/tty/serial/8250/8250_fintek.c | 4 ++-- kernel/configs/tiny.config | 8 ++++++++ lib/test_hash.c | 8 ++++---- 7 files changed, 31 insertions(+), 12 deletions(-)
Re: [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
In reply to Arnd Bergmann2016-08-11 6:54 GMT+09:00 Arnd Bergmann <[email protected]>:
Quoted 25 lines
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_XZchanges choice state .config:962:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice state .config:933:warning: override: SLOB changes choice state .config:930:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice state .config:870:warning: override: SLOB changes choice state .config:868:warning: override:KERNEL_XZchanges choice state .config:867:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice stateI've made a previous attempt at fixing them and we discussed a number of alternatives.
I tried changing the
Makefileto 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.
Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>https://patchwork.kernel.org/patch/9212749/
Reviewed-by Josh Triplett <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Andrew Morton <[email protected]>---
Signature · 2 lines
Best Regards Masahiro Yamada
Re: [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
In reply to Arnd BergmannQuoted 49 lines · 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_XZchanges choice state .config:962:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice state .config:933:warning: override: SLOB changes choice state .config:930:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice state .config:870:warning: override: SLOB changes choice state .config:868:warning: override:KERNEL_XZchanges choice state .config:867:warning: override:CC_OPTIMIZE_FOR_SIZEchanges choice stateI've made a previous attempt at fixing them and we discussed a number of alternatives.
I tried changing the
Makefileto 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 <[email protected]>https://patchwork.kernel.org/patch/9212749/
Reviewed-by Josh Triplett <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Andrew Morton <[email protected]>---
This version incorporates feedback from Masahiro Yamada, and includes the x86 change that Josh mentionedUnlike the other patches in this series, this is not a recent regression, but it is the only non-regression warning fix I'm aware of that we currently need for a clean build on all configurations tested by
https://kernelci.org/.--- arch/x86/configs/tiny.config | 2 ++ kernel/configs/tiny.config | 8 ++++++++ 2 files changed, 10 insertions(+)arch/x86/configs/tiny.config +0
-0
arch/x86/configs/tiny.config line 3
Quoted 3 lines
arch/x86/configs/tiny.config +2
-0@@ -1 +1,3 @@ CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set
Thanks,
Ingo
Re: [PATCH 2/9] dsa: mv88e6xxx: hide unused functions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
Date: Wed, 10 Aug 2016 23:54:08 +0200
Quoted 10 lines
When
CONFIG_NET_DSA_HWMONis disabled, we get warnings about two unused functions whose only callers are all inside of an #ifdef:
drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function]drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function]This adds another ifdef around the function definitions. The warnings appeared after the functions were marked 'static', but the problem was already there before that.
Quoted 7 lines
Signed-off-by Arnd Bergmann <[email protected]>Fixes 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")Reviewed-by Vivien Didelot <[email protected]>---
When I first submitted it on June 23, there was a clash with some other patches, this version is based on top of current mainline, which contains those patches already, so it should apply cleanly.
Applied, thanks.
Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling
In reply to Arnd BergmannQuoted 12 lines · Arnd Bergmann
I could not figure out why, but gcc cannot prove that the
kona_timer_initfunction always initializes its two outputs, and we get a warning for the use of the 'lsw' variable later, which is obviously correct.
drivers/clocksource/bcm_kona_timer.c: In function 'kona_timer_init':drivers/clocksource/bcm_kona_timer.c:119:13: error: 'lsw' may be used uninitialized in this function [-Werror=maybe-uninitialized]Slightly reordering the loop makes the warning disappear, after it becomes more obvious to the compiler that the loop is always entered on the first iteration.
Quoted 7 lines
As pointed out by Ray Jui, there is a related problem in the way we deal with the loop running into the limit, as we just keep going there with an invalid counter data, so instead we now propagate a
-ETIMEDOUTresult to the caller.Signed-off-by Arnd Bergmann <[email protected]>
Hi Arnd,
I applied this patch as a fix.
Thanks !
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog