Skip to contentSkip to conversation

coresight: platform: add OF/APCI dependency

PATCH Applied Arnd Bergmann 3 participants 3 messages Jun 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coresight: platform: add OF/APCI dependency

When neither CONFIG_OF nor CONFIG_ACPI are set, we get a harmless build warning:

drivers/hwtracing/coresight/coresight-platform.c:26:12: error: unused function 'coresight_alloc_conns'
[-Werror,-Wunused-function]
static int coresight_alloc_conns(struct device *dev,

           ^

drivers/hwtracing/coresight/coresight-platform.c:46:1: error: unused function 'coresight_find_device_by_fwnode'
[-Werror,-Wunused-function]
coresight_find_device_by_fwnode(struct fwnode_handle *fwnode)

As the code is useless in that configuration anyway, just add a Kconfig dependency that only allows building when at least one of the two is set.

This should not hinder compile-testing, as CONFIG_OF can be enabled on any architecture.

Fixes ac0e232c12f0 ("coresight: platform: Use fwnode handle for device search")
---
 drivers/hwtracing/coresight/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/Kconfig +1 -0
index 5487d4a1abc2..14638db4991d 100644
@@ -4,6 +4,7 @@
 #
 menuconfig CORESIGHT
 	bool "CoreSight Tracing Support"
+	depends on OF || ACPI
 	select ARM_AMBA
 	select PERF_EVENTS
 	help
Signature · 7 lines
2.20.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 11 lines · Arnd Bergmann

When neither CONFIG_OF nor CONFIG_ACPI are set, we get a harmless build warning:

drivers/hwtracing/coresight/coresight-platform.c:26:12: error: unused function 'coresight_alloc_conns'
[-Werror,-Wunused-function]
static int coresight_alloc_conns(struct device *dev,

            ^

drivers/hwtracing/coresight/coresight-platform.c:46:1: error: unused function 'coresight_find_device_by_fwnode'
[-Werror,-Wunused-function]
coresight_find_device_by_fwnode(struct fwnode_handle *fwnode)

Quoted 6 lines

As the code is useless in that configuration anyway, just add a Kconfig dependency that only allows building when at least one of the two is set.

This should not hinder compile-testing, as CONFIG_OF can be enabled on any architecture.

Ok, that justifies why "not using ARM || ARM64" is better.

Quoted 3 lines
Fixes ac0e232c12f0 ("coresight: platform: Use fwnode handle for device search")
Quoted 17 lines
---
  drivers/hwtracing/coresight/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/Kconfig +1 -0
index 5487d4a1abc2..14638db4991d 100644
@@ -4,6 +4,7 @@
  #
  menuconfig CORESIGHT
  	bool "CoreSight Tracing Support"
+	depends on OF || ACPI
  	select ARM_AMBA
  	select PERF_EVENTS
  	help
#2 lore raw
In reply to Arnd Bergmann
Quoted 30 lines · Arnd Bergmann

When neither CONFIG_OF nor CONFIG_ACPI are set, we get a harmless build warning:

drivers/hwtracing/coresight/coresight-platform.c:26:12: error: unused function 'coresight_alloc_conns'
[-Werror,-Wunused-function]
static int coresight_alloc_conns(struct device *dev,

           ^

drivers/hwtracing/coresight/coresight-platform.c:46:1: error: unused function 'coresight_find_device_by_fwnode'
[-Werror,-Wunused-function]
coresight_find_device_by_fwnode(struct fwnode_handle *fwnode)

As the code is useless in that configuration anyway, just add a Kconfig dependency that only allows building when at least one of the two is set.

This should not hinder compile-testing, as CONFIG_OF can be enabled on any architecture.

Fixes ac0e232c12f0 ("coresight: platform: Use fwnode handle for device search")
---
 drivers/hwtracing/coresight/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/Kconfig +0 -0
index 5487d4a1abc2..14638db4991d 100644

drivers/hwtracing/coresight/Kconfig line 7

Quoted 4 lines
drivers/hwtracing/coresight/Kconfig +1 -0
@@ -4,6 +4,7 @@
 #
 menuconfig CORESIGHT
        bool "CoreSight Tracing Support"
+       depends on OF || ACPI

I have applied this - thanks,
Mathieu

Quoted 6 lines
drivers/hwtracing/coresight/Kconfig +0 -1
        select ARM_AMBA
        select PERF_EVENTS
        help
--

2.20.0