All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: mvebu: randconfig warning fixes
@ 2016-02-23 14:06 Arnd Bergmann
  2016-02-23 14:06   ` Arnd Bergmann
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

Here are three more warning fixes for orion/mv78xx0/mvebu. All
are really harmless and I'm just shutting up the warnings
as the current code is basically ok.

	Arnd

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

* [PATCH 1/3] ARM: orion: only select I2C_BOARDINFO when using I2C
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
@ 2016-02-23 14:06   ` Arnd Bergmann
  2016-02-23 14:06   ` Arnd Bergmann
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: Gregory Clement, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth
  Cc: linux-arm-kernel, Arnd Bergmann, linux-kernel

If we select I2C_BOARDINFO and I2C is disabled, we get a
harmless Kconfig warning:

warning: (MACH_DOVE_DB && MACH_DB88F5281 && MACH_RD88F5182 && MACH_RD88F5182_DT && MACH_KUROBOX_PRO && MACH_DNS323 && MACH_LINKSTATION_PRO && MACH_LINKSTATION_LSCHL && MACH_LINKSTATION_LS_HGL && MACH_NET2BIG) selects I2C_BOARDINFO which has unmet direct dependencies (I2C)

Making the select itself conditional avoids the warning and
makes the kernel slightly smaller as the compiler will be
able to drop the unused board info.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-dove/Kconfig    |  2 +-
 arch/arm/mach-orion5x/Kconfig | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 0fd506125cde..5cc9f7450197 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -18,7 +18,7 @@ config DOVE_LEGACY
 config MACH_DOVE_DB
 	bool "Marvell DB-MV88AP510 Development Board"
 	select DOVE_LEGACY
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell DB-MV88AP510 Development Board.
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 4c0acd844429..a9ae143703f8 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -28,14 +28,14 @@ config ARCH_ORION5X_DT
 
 config MACH_DB88F5281
 	bool "Marvell Orion-2 Development Board"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell Orion-2 (88F5281) Development Board
 
 config MACH_RD88F5182
 	bool "Marvell Orion-NAS Reference Design"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell Orion-NAS (88F5182) RD2
@@ -43,14 +43,14 @@ config MACH_RD88F5182
 config MACH_RD88F5182_DT
 	bool "Marvell Orion-NAS Reference Design (Flattened Device Tree)"
 	select ARCH_ORION5X_DT
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the Marvell
 	  Orion-NAS (88F5182) RD2, Flattened Device Tree.
 
 config MACH_KUROBOX_PRO
 	bool "KuroBox Pro"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  KuroBox Pro platform.
@@ -58,7 +58,7 @@ config MACH_KUROBOX_PRO
 config MACH_DNS323
 	bool "D-Link DNS-323"
 	select GENERIC_NET_UTILS
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  D-Link DNS-323 platform.
@@ -78,7 +78,7 @@ config MACH_TERASTATION_PRO2
 
 config MACH_LINKSTATION_PRO
 	bool "Buffalo Linkstation Pro/Live"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation Pro/Live platform. Both v1 and
@@ -86,7 +86,7 @@ config MACH_LINKSTATION_PRO
 
 config MACH_LINKSTATION_LSCHL
 	bool "Buffalo Linkstation Live v3 (LS-CHL)"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation Live v3 (LS-CHL) platform.
@@ -100,7 +100,7 @@ config MACH_LINKSTATION_MINI
 
 config MACH_LINKSTATION_LS_HGL
 	bool "Buffalo Linkstation LS-HGL"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation LS-HGL platform.
@@ -139,7 +139,7 @@ config MACH_D2NET_DT
 
 config MACH_NET2BIG
 	bool "LaCie 2Big Network"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie 2Big Network NAS.
-- 
2.7.0

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

* [PATCH 1/3] ARM: orion: only select I2C_BOARDINFO when using I2C
@ 2016-02-23 14:06   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

If we select I2C_BOARDINFO and I2C is disabled, we get a
harmless Kconfig warning:

warning: (MACH_DOVE_DB && MACH_DB88F5281 && MACH_RD88F5182 && MACH_RD88F5182_DT && MACH_KUROBOX_PRO && MACH_DNS323 && MACH_LINKSTATION_PRO && MACH_LINKSTATION_LSCHL && MACH_LINKSTATION_LS_HGL && MACH_NET2BIG) selects I2C_BOARDINFO which has unmet direct dependencies (I2C)

Making the select itself conditional avoids the warning and
makes the kernel slightly smaller as the compiler will be
able to drop the unused board info.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-dove/Kconfig    |  2 +-
 arch/arm/mach-orion5x/Kconfig | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig
index 0fd506125cde..5cc9f7450197 100644
--- a/arch/arm/mach-dove/Kconfig
+++ b/arch/arm/mach-dove/Kconfig
@@ -18,7 +18,7 @@ config DOVE_LEGACY
 config MACH_DOVE_DB
 	bool "Marvell DB-MV88AP510 Development Board"
 	select DOVE_LEGACY
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell DB-MV88AP510 Development Board.
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig
index 4c0acd844429..a9ae143703f8 100644
--- a/arch/arm/mach-orion5x/Kconfig
+++ b/arch/arm/mach-orion5x/Kconfig
@@ -28,14 +28,14 @@ config ARCH_ORION5X_DT
 
 config MACH_DB88F5281
 	bool "Marvell Orion-2 Development Board"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell Orion-2 (88F5281) Development Board
 
 config MACH_RD88F5182
 	bool "Marvell Orion-NAS Reference Design"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell Orion-NAS (88F5182) RD2
@@ -43,14 +43,14 @@ config MACH_RD88F5182
 config MACH_RD88F5182_DT
 	bool "Marvell Orion-NAS Reference Design (Flattened Device Tree)"
 	select ARCH_ORION5X_DT
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the Marvell
 	  Orion-NAS (88F5182) RD2, Flattened Device Tree.
 
 config MACH_KUROBOX_PRO
 	bool "KuroBox Pro"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  KuroBox Pro platform.
@@ -58,7 +58,7 @@ config MACH_KUROBOX_PRO
 config MACH_DNS323
 	bool "D-Link DNS-323"
 	select GENERIC_NET_UTILS
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  D-Link DNS-323 platform.
@@ -78,7 +78,7 @@ config MACH_TERASTATION_PRO2
 
 config MACH_LINKSTATION_PRO
 	bool "Buffalo Linkstation Pro/Live"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation Pro/Live platform. Both v1 and
@@ -86,7 +86,7 @@ config MACH_LINKSTATION_PRO
 
 config MACH_LINKSTATION_LSCHL
 	bool "Buffalo Linkstation Live v3 (LS-CHL)"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation Live v3 (LS-CHL) platform.
@@ -100,7 +100,7 @@ config MACH_LINKSTATION_MINI
 
 config MACH_LINKSTATION_LS_HGL
 	bool "Buffalo Linkstation LS-HGL"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  Buffalo Linkstation LS-HGL platform.
@@ -139,7 +139,7 @@ config MACH_D2NET_DT
 
 config MACH_NET2BIG
 	bool "LaCie 2Big Network"
-	select I2C_BOARDINFO
+	select I2C_BOARDINFO if I2C
 	help
 	  Say 'Y' here if you want your kernel to support the
 	  LaCie 2Big Network NAS.
-- 
2.7.0

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

* [PATCH 2/3] ARM: mv78xx0: avoid unused function warning
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
@ 2016-02-23 14:06   ` Arnd Bergmann
  2016-02-23 14:06   ` Arnd Bergmann
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: Gregory Clement, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth
  Cc: linux-arm-kernel, Arnd Bergmann, linux-kernel

mv78xx0 produces a harmless warning when CONFIG_CACHE_FEROCEON_L2 is
disabled:

arch/arm/mach-mv78xx0/common.c:385:19: warning: 'is_l2_writethrough' defined but not used [-Wunused-function]

This avoids the warning by changing the #ifdef to an if(IS_ENABLED())
check with the same resulting object code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-mv78xx0/common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index a1a04df9c05c..99cc93900a24 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -405,9 +405,8 @@ void __init mv78xx0_init(void)
 	printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
 	printk("TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
 
-#ifdef CONFIG_CACHE_FEROCEON_L2
-	feroceon_l2_init(is_l2_writethrough());
-#endif
+	if (IS_ENABLED(CONFIG_CACHE_FEROCEON_L2))
+		feroceon_l2_init(is_l2_writethrough());
 
 	/* Setup root of clk tree */
 	clk_init();
-- 
2.7.0

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

* [PATCH 2/3] ARM: mv78xx0: avoid unused function warning
@ 2016-02-23 14:06   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

mv78xx0 produces a harmless warning when CONFIG_CACHE_FEROCEON_L2 is
disabled:

arch/arm/mach-mv78xx0/common.c:385:19: warning: 'is_l2_writethrough' defined but not used [-Wunused-function]

This avoids the warning by changing the #ifdef to an if(IS_ENABLED())
check with the same resulting object code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-mv78xx0/common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index a1a04df9c05c..99cc93900a24 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -405,9 +405,8 @@ void __init mv78xx0_init(void)
 	printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
 	printk("TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
 
-#ifdef CONFIG_CACHE_FEROCEON_L2
-	feroceon_l2_init(is_l2_writethrough());
-#endif
+	if (IS_ENABLED(CONFIG_CACHE_FEROCEON_L2))
+		feroceon_l2_init(is_l2_writethrough());
 
 	/* Setup root of clk tree */
 	clk_init();
-- 
2.7.0

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

* [PATCH 3/3] ARM: mvebu: mark mvebu_hwcc_pci_nb as __maybe_unused
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
@ 2016-02-23 14:06   ` Arnd Bergmann
  2016-02-23 14:06   ` Arnd Bergmann
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: Gregory Clement, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth
  Cc: linux-arm-kernel, Arnd Bergmann, linux-kernel

The coherency notifier block is only used when CONFIG_PCI
is enabled, otherwise we get a warning:

arch/arm/mach-mvebu/coherency.c:110:30: warning: 'mvebu_hwcc_pci_nb' defined but not used [-Wunused-variable]

There is no nice way to use an if(IS_ENABLED()) check here to
let the compiler know that it might be used, so let's mark
the structure as __maybe_unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-mvebu/coherency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 55348ee5a352..7e989d61159c 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -107,7 +107,7 @@ static struct notifier_block mvebu_hwcc_nb = {
 	.notifier_call = mvebu_hwcc_notifier,
 };
 
-static struct notifier_block mvebu_hwcc_pci_nb = {
+static struct notifier_block mvebu_hwcc_pci_nb __maybe_unused = {
 	.notifier_call = mvebu_hwcc_notifier,
 };
 
-- 
2.7.0

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

* [PATCH 3/3] ARM: mvebu: mark mvebu_hwcc_pci_nb as __maybe_unused
@ 2016-02-23 14:06   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:06 UTC (permalink / raw)
  To: linux-arm-kernel

The coherency notifier block is only used when CONFIG_PCI
is enabled, otherwise we get a warning:

arch/arm/mach-mvebu/coherency.c:110:30: warning: 'mvebu_hwcc_pci_nb' defined but not used [-Wunused-variable]

There is no nice way to use an if(IS_ENABLED()) check here to
let the compiler know that it might be used, so let's mark
the structure as __maybe_unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-mvebu/coherency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 55348ee5a352..7e989d61159c 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -107,7 +107,7 @@ static struct notifier_block mvebu_hwcc_nb = {
 	.notifier_call = mvebu_hwcc_notifier,
 };
 
-static struct notifier_block mvebu_hwcc_pci_nb = {
+static struct notifier_block mvebu_hwcc_pci_nb __maybe_unused = {
 	.notifier_call = mvebu_hwcc_notifier,
 };
 
-- 
2.7.0

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

* [PATCH 0/3] ARM: mvebu: randconfig warning fixes
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
                   ` (2 preceding siblings ...)
  2016-02-23 14:06   ` Arnd Bergmann
@ 2016-02-23 14:27 ` Andrew Lunn
  2016-02-23 15:17 ` Jason Cooper
  2016-02-25 14:54 ` Gregory CLEMENT
  5 siblings, 0 replies; 10+ messages in thread
From: Andrew Lunn @ 2016-02-23 14:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 23, 2016 at 03:06:36PM +0100, Arnd Bergmann wrote:
> Here are three more warning fixes for orion/mv78xx0/mvebu. All
> are really harmless and I'm just shutting up the warnings
> as the current code is basically ok.

Hi Arnd

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

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

* [PATCH 0/3] ARM: mvebu: randconfig warning fixes
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
                   ` (3 preceding siblings ...)
  2016-02-23 14:27 ` [PATCH 0/3] ARM: mvebu: randconfig warning fixes Andrew Lunn
@ 2016-02-23 15:17 ` Jason Cooper
  2016-02-25 14:54 ` Gregory CLEMENT
  5 siblings, 0 replies; 10+ messages in thread
From: Jason Cooper @ 2016-02-23 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hey Arnd,

On Tue, Feb 23, 2016 at 03:06:36PM +0100, Arnd Bergmann wrote:
> Here are three more warning fixes for orion/mv78xx0/mvebu. All
> are really harmless and I'm just shutting up the warnings
> as the current code is basically ok.

Acked-by: Jason Cooper <jason@lakedaemon.net>

thx,

Jason.

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

* [PATCH 0/3] ARM: mvebu: randconfig warning fixes
  2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
                   ` (4 preceding siblings ...)
  2016-02-23 15:17 ` Jason Cooper
@ 2016-02-25 14:54 ` Gregory CLEMENT
  5 siblings, 0 replies; 10+ messages in thread
From: Gregory CLEMENT @ 2016-02-25 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,
 
 On mar., f?vr. 23 2016, Arnd Bergmann <arnd@arndb.de> wrote:

> Here are three more warning fixes for orion/mv78xx0/mvebu. All
> are really harmless and I'm just shutting up the warnings
> as the current code is basically ok.

Applied on mvebu/soc with the Reviewed-by flag by Andrew Lunn and the
Acked-by flag by Jason Cooper.

Thanks,

Gregory

>
> 	Arnd
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

end of thread, other threads:[~2016-02-25 14:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 14:06 [PATCH 0/3] ARM: mvebu: randconfig warning fixes Arnd Bergmann
2016-02-23 14:06 ` [PATCH 1/3] ARM: orion: only select I2C_BOARDINFO when using I2C Arnd Bergmann
2016-02-23 14:06   ` Arnd Bergmann
2016-02-23 14:06 ` [PATCH 2/3] ARM: mv78xx0: avoid unused function warning Arnd Bergmann
2016-02-23 14:06   ` Arnd Bergmann
2016-02-23 14:06 ` [PATCH 3/3] ARM: mvebu: mark mvebu_hwcc_pci_nb as __maybe_unused Arnd Bergmann
2016-02-23 14:06   ` Arnd Bergmann
2016-02-23 14:27 ` [PATCH 0/3] ARM: mvebu: randconfig warning fixes Andrew Lunn
2016-02-23 15:17 ` Jason Cooper
2016-02-25 14:54 ` Gregory CLEMENT

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.