Skip to content

Commit

Permalink
coresight: Use IS_ENABLED for CONFIGs that may be modules
Browse files Browse the repository at this point in the history
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 <mathieu.poirier@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Russell King <linux@armlinux.org.uk>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200928163513.70169-4-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kim Phillips authored and Greg Kroah-Hartman committed Sep 28, 2020
1 parent 9cf087b commit b812711
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-etm-perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,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
Expand Down
2 changes: 1 addition & 1 deletion include/linux/coresight.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b812711

Please sign in to comment.