Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] coresight: platform: add OF/APCI dependency
@ 2019-06-17 12:58 Arnd Bergmann
  2019-06-17 13:19 ` Suzuki K Poulose
  2019-06-17 19:40 ` Mathieu Poirier
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-06-17 12:58 UTC (permalink / raw)
  To: Mathieu Poirier, Alexander Shishkin
  Cc: linux-kernel, linux-arm-kernel, Arnd Bergmann, Suzuki K Poulose

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hwtracing/coresight/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig
index 5487d4a1abc2..14638db4991d 100644
--- a/drivers/hwtracing/coresight/Kconfig
+++ b/drivers/hwtracing/coresight/Kconfig
@@ -4,6 +4,7 @@
 #
 menuconfig CORESIGHT
 	bool "CoreSight Tracing Support"
+	depends on OF || ACPI
 	select ARM_AMBA
 	select PERF_EVENTS
 	help
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] coresight: platform: add OF/APCI dependency
  2019-06-17 12:58 [PATCH] coresight: platform: add OF/APCI dependency Arnd Bergmann
@ 2019-06-17 13:19 ` Suzuki K Poulose
  2019-06-17 19:40 ` Mathieu Poirier
  1 sibling, 0 replies; 3+ messages in thread
From: Suzuki K Poulose @ 2019-06-17 13:19 UTC (permalink / raw)
  To: arnd, mathieu.poirier, alexander.shishkin; +Cc: linux-kernel, linux-arm-kernel

Hi Arnd,

On 17/06/2019 13:58, Arnd Bergmann wrote:
> 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.

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


> 
> Fixes: ac0e232c12f0 ("coresight: platform: Use fwnode handle for device search")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> ---
>   drivers/hwtracing/coresight/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig
> index 5487d4a1abc2..14638db4991d 100644
> --- a/drivers/hwtracing/coresight/Kconfig
> +++ b/drivers/hwtracing/coresight/Kconfig
> @@ -4,6 +4,7 @@
>   #
>   menuconfig CORESIGHT
>   	bool "CoreSight Tracing Support"
> +	depends on OF || ACPI
>   	select ARM_AMBA
>   	select PERF_EVENTS
>   	help
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] coresight: platform: add OF/APCI dependency
  2019-06-17 12:58 [PATCH] coresight: platform: add OF/APCI dependency Arnd Bergmann
  2019-06-17 13:19 ` Suzuki K Poulose
@ 2019-06-17 19:40 ` Mathieu Poirier
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2019-06-17 19:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alexander Shishkin, Linux Kernel Mailing List, linux-arm-kernel,
	Suzuki K Poulose

On Mon, 17 Jun 2019 at 06:59, Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/hwtracing/coresight/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig
> index 5487d4a1abc2..14638db4991d 100644
> --- a/drivers/hwtracing/coresight/Kconfig
> +++ b/drivers/hwtracing/coresight/Kconfig
> @@ -4,6 +4,7 @@
>  #
>  menuconfig CORESIGHT
>         bool "CoreSight Tracing Support"
> +       depends on OF || ACPI

I have applied this - thanks,
Mathieu

>         select ARM_AMBA
>         select PERF_EVENTS
>         help
> --
> 2.20.0
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 12:58 [PATCH] coresight: platform: add OF/APCI dependency Arnd Bergmann
2019-06-17 13:19 ` Suzuki K Poulose
2019-06-17 19:40 ` Mathieu Poirier

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox