Subject: Re: [PATCH v8 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules

From: Mathieu Poirier <[email-masked]>
Date: Wed, 12 Aug 2020 11:54:49 -0600

On Fri, Aug 07, 2020 at 07:11:32PM +0800, Tingwei Zhang wrote:
> From: Kim Phillips <[email-masked]>
> 
> Checking for ifdef CONFIG_x fails if CONFIG_x=m.  Use IS_ENABLED
> that is true for both built-ins and modules, instead.  Required
> when building coresight components as modules.
> 
> Cc: Mathieu Poirier <[email-masked]>
> Cc: Leo Yan <[email-masked]>
> Cc: Alexander Shishkin <[email-masked]>
> Cc: Randy Dunlap <[email-masked]>
> Cc: Suzuki K Poulose <[email-masked]>
> Cc: Greg Kroah-Hartman <[email-masked]>
> Cc: Russell King <[email-masked]>
> Signed-off-by: Kim Phillips <[email-masked]>
> Signed-off-by: Tingwei Zhang <[email-masked]>
> Reviewed-by: Suzuki K Poulose <[email-masked]>
> ---
>  drivers/hwtracing/coresight/coresight-etm-perf.h | 2 +-
>  drivers/hwtracing/coresight/coresight-priv.h     | 2 +-
>  include/linux/coresight.h                        | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

For patches 02 and 03:

Reviewed-by: Mathieu Poirier <[email-masked]>

> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.h b/drivers/hwtracing/coresight/coresight-etm-perf.h
> index 015213abe00a..05f89723e282 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.h
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.h
> @@ -57,7 +57,7 @@ struct etm_event_data {
>  	struct list_head * __percpu *path;
>  };
>  
> -#ifdef CONFIG_CORESIGHT
> +#if IS_ENABLED(CONFIG_CORESIGHT)
>  int etm_perf_symlink(struct coresight_device *csdev, bool link);
>  int etm_perf_add_symlink_sink(struct coresight_device *csdev);
>  void etm_perf_del_symlink_sink(struct coresight_device *csdev);
> diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h
> index f2dc625ea585..d801a2755432 100644
> --- a/drivers/hwtracing/coresight/coresight-priv.h
> +++ b/drivers/hwtracing/coresight/coresight-priv.h
> @@ -165,7 +165,7 @@ int coresight_make_links(struct coresight_device *orig,
>  void coresight_remove_links(struct coresight_device *orig,
>  			    struct coresight_connection *conn);
>  
> -#ifdef CONFIG_CORESIGHT_SOURCE_ETM3X
> +#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM3X)
>  extern int etm_readl_cp14(u32 off, unsigned int *val);
>  extern int etm_writel_cp14(u32 off, u32 val);
>  #else
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 58fffdecdbfd..3bb738f9a326 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -324,7 +324,7 @@ struct coresight_ops {
>  	const struct coresight_ops_ect *ect_ops;
>  };
>  
> -#ifdef CONFIG_CORESIGHT
> +#if IS_ENABLED(CONFIG_CORESIGHT)
>  extern struct coresight_device *
>  coresight_register(struct coresight_desc *desc);
>  extern void coresight_unregister(struct coresight_device *csdev);
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel