All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] v4.8 build regressions
@ 2016-08-10 21:54 ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  Cc: Arnd Bergmann, Andrew Lunn, Andrew Morton, Daniel Lezcano,
	David Airlie, dri-devel, Geert Uytterhoeven, George Spelvin,
	Greg Kroah-Hartman, Jiri Slaby, Ji-Ze Hong, Josh Triplett,
	kernel-build-reports, linux-arm-kernel, linux-kernel,
	Masahiro Yamada, Matthias Brugger, netdev, Philipp Zabel,
	Ricardo Ribalda Delgado, Thomas Gleixner, Vivien Didelot, x86

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(-)

-- 
2.9.0

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: George Spelvin <linux@sciencehorizons.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: kernel-build-reports@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: netdev@vger.kernel.org
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: x86@kernel.org

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

* [PATCH 0/9] v4.8 build regressions
@ 2016-08-10 21:54 ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  Cc: Andrew Lunn, x86, kernel-build-reports, dri-devel,
	Masahiro Yamada, Daniel Lezcano, Geert Uytterhoeven, Jiri Slaby,
	Arnd Bergmann, Josh Triplett, George Spelvin, Matthias Brugger,
	Ji-Ze Hong, Thomas Gleixner, linux-arm-kernel, Vivien Didelot,
	Greg Kroah-Hartman, linux-kernel, netdev, Andrew Morton

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(-)

-- 
2.9.0

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: George Spelvin <linux@sciencehorizons.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: kernel-build-reports@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: netdev@vger.kernel.org
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: x86@kernel.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 0/9] v4.8 build regressions
@ 2016-08-10 21:54 ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
2.9.0

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel at lists.freedesktop.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: George Spelvin <linux@sciencehorizons.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
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 <yamada.masahiro@socionext.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: netdev at vger.kernel.org
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: x86 at kernel.org

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

* [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  2016-08-10 21:54 ` Arnd Bergmann
  (?)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  2016-08-11  8:43   ` Masahiro Yamada
  2016-08-11  8:59   ` Ingo Molnar
  -1 siblings, 2 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: x86
  Cc: Arnd Bergmann, Masahiro Yamada, Andrew Morton, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Josh Triplett, linux-kernel

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>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
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(+)

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] 27+ messages in thread

* [PATCH 2/9] dsa: mv88e6xxx: hide unused functions
  2016-08-10 21:54 ` Arnd Bergmann
                   ` (2 preceding siblings ...)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  2016-08-13  0:32   ` David Miller
  -1 siblings, 1 reply; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot
  Cc: Arnd Bergmann, David S. Miller, Florian Fainelli, netdev, linux-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
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(+)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d36aedde8cb9..d1d9d3cf9139 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -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)
 {
-- 
2.9.0

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

* [PATCH 3/9] drm/mediatek: add COMMON_CLK dependency
  2016-08-10 21:54 ` Arnd Bergmann
  (?)
@ 2016-08-10 21:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, Matthias Brugger, Philipp Zabel, dri-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek

On 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.kernel.org/patch/9069061/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 23ac8041c562..5c2163737691 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 3/9] drm/mediatek: add COMMON_CLK dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, linux-kernel, dri-devel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

On 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.kernel.org/patch/9069061/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 23ac8041c562..5c2163737691 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 3/9] drm/mediatek: add COMMON_CLK dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.kernel.org/patch/9069061/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 23ac8041c562..5c2163737691 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 4/9] drm/mediatek: add CONFIG_OF dependency
  2016-08-10 21:54 ` Arnd Bergmann
  (?)
@ 2016-08-10 21:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, Matthias Brugger, Philipp Zabel, dri-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek

The 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.kernel.org/patch/9120871/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 5c2163737691..96ebf8bb6024 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 4/9] drm/mediatek: add CONFIG_OF dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, linux-kernel, dri-devel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

The 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.kernel.org/patch/9120871/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 5c2163737691..96ebf8bb6024 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 4/9] drm/mediatek: add CONFIG_OF dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

The 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.kernel.org/patch/9120871/
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 5c2163737691..96ebf8bb6024 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 5/9] drm/mediatek: add ARM_SMCCC dependency
  2016-08-10 21:54 ` Arnd Bergmann
  (?)
@ 2016-08-10 21:54   ` Arnd Bergmann
  -1 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, Matthias Brugger, Philipp Zabel, dri-devel,
	linux-kernel, linux-arm-kernel, linux-mediatek

ARM 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 96ebf8bb6024..294de4549922 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 5/9] drm/mediatek: add ARM_SMCCC dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: David Airlie
  Cc: Arnd Bergmann, linux-kernel, dri-devel, linux-mediatek,
	Matthias Brugger, linux-arm-kernel

ARM 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 96ebf8bb6024..294de4549922 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 5/9] drm/mediatek: add ARM_SMCCC dependency
@ 2016-08-10 21:54   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

ARM 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
---
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(+)

diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig
index 96ebf8bb6024..294de4549922 100644
--- a/drivers/gpu/drm/mediatek/Kconfig
+++ b/drivers/gpu/drm/mediatek/Kconfig
@@ -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
-- 
2.9.0

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

* [PATCH 6/9] clocksource: kona: fix get_counter error handling
  2016-08-10 21:54 ` Arnd Bergmann
                   ` (6 preceding siblings ...)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  2016-08-11  0:00   ` Ray Jui
  2016-08-16 13:11   ` Daniel Lezcano
  -1 siblings, 2 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Arnd Bergmann, Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-kernel

I 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patchwork.kernel.org/patch/9174261/
---
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(-)

diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c
index 7e3fd375a627..92f6e4deee74 100644
--- a/drivers/clocksource/bcm_kona_timer.c
+++ b/drivers/clocksource/bcm_kona_timer.c
@@ -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);
-- 
2.9.0

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

* [PATCH 7/9] 8250/fintek: rename IRQ_MODE macro
  2016-08-10 21:54 ` Arnd Bergmann
                   ` (7 preceding siblings ...)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  -1 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, Jiri Slaby, Ji-Ze Hong (Peter Hong),
	Peter Hurley, linux-serial, linux-kernel

A 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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4da22f1418cb ("serial: 8250_fintek: fix the mismatched IRQ mode")
Link: https://patchwork.kernel.org/patch/9200119/
Acked-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Acked-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
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(-)

diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c
index 737b4b3957b0..0facc789fe7d 100644
--- a/drivers/tty/serial/8250/8250_fintek.c
+++ b/drivers/tty/serial/8250/8250_fintek.c
@@ -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;
-- 
2.9.0

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

* [PATCH 8/9] test/hash: Fix warning in two-dimensional array init
  2016-08-10 21:54 ` Arnd Bergmann
                   ` (8 preceding siblings ...)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  -1 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: George Spelvin; +Cc: Geert Uytterhoeven, Arnd Bergmann, linux-kernel

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] 27+ messages in thread

* [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation
  2016-08-10 21:54 ` Arnd Bergmann
                   ` (9 preceding siblings ...)
  (?)
@ 2016-08-10 21:54 ` Arnd Bergmann
  2016-08-10 22:45   ` Arnd Bergmann
  -1 siblings, 1 reply; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 21:54 UTC (permalink / raw)
  To: George Spelvin; +Cc: Arnd Bergmann, Geert Uytterhoeven, linux-kernel

From: George Spelvin <linux@sciencehorizons.net>

Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 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:
Acked-by: George Spelvin <linux@sciencehorizons.net>

But here's an alternative.  Geert, what do you think of this?
Acked-by: George Spelvin <linux@sciencehorizons.net>

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/test_hash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

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

* Re: [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation
  2016-08-10 21:54 ` [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann
@ 2016-08-10 22:45   ` Arnd Bergmann
  0 siblings, 0 replies; 27+ messages in thread
From: Arnd Bergmann @ 2016-08-10 22:45 UTC (permalink / raw)
  To: George Spelvin; +Cc: Geert Uytterhoeven, linux-kernel

On Wednesday, August 10, 2016 11:54:15 PM CEST Arnd Bergmann wrote:
> From: George Spelvin <linux@sciencehorizons.net>
> 
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > 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:
> Acked-by: George Spelvin <linux@sciencehorizons.net>
> 
> But here's an alternative.  Geert, what do you think of this?
> Acked-by: George Spelvin <linux@sciencehorizons.net>

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

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

* Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling
  2016-08-10 21:54 ` [PATCH 6/9] clocksource: kona: fix get_counter error handling Arnd Bergmann
@ 2016-08-11  0:00   ` Ray Jui
  2016-08-16 13:11   ` Daniel Lezcano
  1 sibling, 0 replies; 27+ messages in thread
From: Ray Jui @ 2016-08-11  0:00 UTC (permalink / raw)
  To: Arnd Bergmann, Daniel Lezcano, Thomas Gleixner
  Cc: Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-kernel

Hi Arnd,

On 8/10/2016 2:54 PM, Arnd Bergmann wrote:
> I 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Link: https://patchwork.kernel.org/patch/9174261/
> ---
> 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(-)
>
> diff --git a/drivers/clocksource/bcm_kona_timer.c b/drivers/clocksource/bcm_kona_timer.c
> index 7e3fd375a627..92f6e4deee74 100644
> --- a/drivers/clocksource/bcm_kona_timer.c
> +++ b/drivers/clocksource/bcm_kona_timer.c
> @@ -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);
>

The change looks good to me! Thanks!

Acked-by: Ray Jui <ray.jui@broadcom.com>

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

* Re: [PATCH 0/9] v4.8 build regressions
  2016-08-10 21:54 ` Arnd Bergmann
  (?)
@ 2016-08-11  6:38   ` Philipp Zabel
  -1 siblings, 0 replies; 27+ messages in thread
From: Philipp Zabel @ 2016-08-11  6:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, Andrew Morton, Daniel Lezcano, David Airlie,
	dri-devel, Geert Uytterhoeven, George Spelvin,
	Greg Kroah-Hartman, Jiri Slaby, Ji-Ze Hong, Josh Triplett,
	kernel-build-reports, linux-arm-kernel, linux-kernel,
	Masahiro Yamada, Matthias Brugger, netdev,
	Ricardo Ribalda Delgado, Thomas Gleixner, Vivien Didelot, x86

Am Mittwoch, den 10.08.2016, 23:54 +0200 schrieb Arnd Bergmann:
> 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

I have picked up the three drm/mediatek patches.

regards
Philipp

>   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(-)

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

* Re: [PATCH 0/9] v4.8 build regressions
@ 2016-08-11  6:38   ` Philipp Zabel
  0 siblings, 0 replies; 27+ messages in thread
From: Philipp Zabel @ 2016-08-11  6:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Lunn, x86, kernel-build-reports, Greg Kroah-Hartman,
	Daniel Lezcano, Josh Triplett, dri-devel, linux-kernel,
	Masahiro Yamada, netdev, Geert Uytterhoeven, George Spelvin,
	Jiri Slaby, Matthias Brugger, Ji-Ze Hong, Andrew Morton,
	Vivien Didelot, Thomas Gleixner, linux-arm-kernel

Am Mittwoch, den 10.08.2016, 23:54 +0200 schrieb Arnd Bergmann:
> 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

I have picked up the three drm/mediatek patches.

regards
Philipp

>   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(-)


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 0/9] v4.8 build regressions
@ 2016-08-11  6:38   ` Philipp Zabel
  0 siblings, 0 replies; 27+ messages in thread
From: Philipp Zabel @ 2016-08-11  6:38 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 10.08.2016, 23:54 +0200 schrieb Arnd Bergmann:
> 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

I have picked up the three drm/mediatek patches.

regards
Philipp

>   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(-)

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

* Re: [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  2016-08-10 21:54 ` [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
@ 2016-08-11  8:43   ` Masahiro Yamada
  2016-08-11  8:59   ` Ingo Molnar
  1 sibling, 0 replies; 27+ messages in thread
From: Masahiro Yamada @ 2016-08-11  8:43 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: X86 ML, Andrew Morton, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Josh Triplett, Linux Kernel Mailing List

2016-08-11 6:54 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> 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>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---


Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  2016-08-10 21:54 ` [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
  2016-08-11  8:43   ` Masahiro Yamada
@ 2016-08-11  8:59   ` Ingo Molnar
  1 sibling, 0 replies; 27+ messages in thread
From: Ingo Molnar @ 2016-08-11  8:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: x86, Masahiro Yamada, Andrew Morton, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Josh Triplett, linux-kernel


* Arnd Bergmann <arnd@arndb.de> wrote:

> 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>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> 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(+)
> 
> 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

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

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

* Re: [PATCH 2/9] dsa: mv88e6xxx: hide unused functions
  2016-08-10 21:54 ` [PATCH 2/9] dsa: mv88e6xxx: hide unused functions Arnd Bergmann
@ 2016-08-13  0:32   ` David Miller
  0 siblings, 0 replies; 27+ messages in thread
From: David Miller @ 2016-08-13  0:32 UTC (permalink / raw)
  To: arnd; +Cc: andrew, vivien.didelot, f.fainelli, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 10 Aug 2016 23:54:08 +0200

> 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")
> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> 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.

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

* Re: [PATCH 6/9] clocksource: kona: fix get_counter error handling
  2016-08-10 21:54 ` [PATCH 6/9] clocksource: kona: fix get_counter error handling Arnd Bergmann
  2016-08-11  0:00   ` Ray Jui
@ 2016-08-16 13:11   ` Daniel Lezcano
  1 sibling, 0 replies; 27+ messages in thread
From: Daniel Lezcano @ 2016-08-16 13:11 UTC (permalink / raw)
  To: Arnd Bergmann, Thomas Gleixner
  Cc: Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-kernel

On 08/10/2016 11:54 PM, Arnd Bergmann wrote:
> I 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.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Link: https://patchwork.kernel.org/patch/9174261/

Hi Arnd,

I applied this patch as a fix.

Thanks !

  -- Daniel



-- 
 <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

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

end of thread, other threads:[~2016-08-16 13:13 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-10 21:54 [PATCH 0/9] v4.8 build regressions Arnd Bergmann
2016-08-10 21:54 ` Arnd Bergmann
2016-08-10 21:54 ` Arnd Bergmann
2016-08-10 21:54 ` [PATCH 1/9] kconfig: tinyconfig: provide whole choice blocks to avoid warnings Arnd Bergmann
2016-08-11  8:43   ` Masahiro Yamada
2016-08-11  8:59   ` Ingo Molnar
2016-08-10 21:54 ` [PATCH 2/9] dsa: mv88e6xxx: hide unused functions Arnd Bergmann
2016-08-13  0:32   ` David Miller
2016-08-10 21:54 ` [PATCH 3/9] drm/mediatek: add COMMON_CLK dependency Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54 ` [PATCH 4/9] drm/mediatek: add CONFIG_OF dependency Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54 ` [PATCH 5/9] drm/mediatek: add ARM_SMCCC dependency Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54   ` Arnd Bergmann
2016-08-10 21:54 ` [PATCH 6/9] clocksource: kona: fix get_counter error handling Arnd Bergmann
2016-08-11  0:00   ` Ray Jui
2016-08-16 13:11   ` Daniel Lezcano
2016-08-10 21:54 ` [PATCH 7/9] 8250/fintek: rename IRQ_MODE macro Arnd Bergmann
2016-08-10 21:54 ` [PATCH 8/9] test/hash: Fix warning in two-dimensional array init Arnd Bergmann
2016-08-10 21:54 ` [PATCH 9/9] test/hash: Fix warning in preprocessor symbol evaluation Arnd Bergmann
2016-08-10 22:45   ` Arnd Bergmann
2016-08-11  6:38 ` [PATCH 0/9] v4.8 build regressions Philipp Zabel
2016-08-11  6:38   ` Philipp Zabel
2016-08-11  6:38   ` Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.