mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] input: coresight: Fix redefinition error on compilation.
@ 2017-07-06  9:15 Arvind Yadav
  2017-07-06  9:43 ` Arvind Yadav
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-07-06  9:15 UTC (permalink / raw)
  To: gregkh, mathieu.poirier; +Cc: linux-arm-kernel, linux-kernel

If CONFIG_CORESIGHT is disable, it'll through compilation error.

drivers/hwtracing/coresight/coresight-etm-perf.c:462:5: error: redefinition of ‘etm_perf_symlink’
 int etm_perf_symlink(struct coresight_device *csdev, bool link)
     ^
In file included from drivers/hwtracing/coresight/coresight-etm-perf.c:30:0:
drivers/hwtracing/coresight/coresight-etm-perf.h:61:19: note: previous definition of ‘etm_perf_symlink’ was here
 static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index e97775d..74ce6a5 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -458,7 +458,7 @@ static void etm_addr_filters_sync(struct perf_event *event)
 
 	filters->nr_filters = i;
 }
-
+#ifdef CONFIG_CORESIGHT
 int etm_perf_symlink(struct coresight_device *csdev, bool link)
 {
 	char entry[sizeof("cpu9999999")];
@@ -483,7 +483,7 @@ int etm_perf_symlink(struct coresight_device *csdev, bool link)
 
 	return 0;
 }
-
+#endif
 static int __init etm_perf_init(void)
 {
 	int ret;
-- 
1.9.1

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

* Re: [PATCH] input: coresight: Fix redefinition error on compilation.
  2017-07-06  9:15 [PATCH] input: coresight: Fix redefinition error on compilation Arvind Yadav
@ 2017-07-06  9:43 ` Arvind Yadav
  0 siblings, 0 replies; 2+ messages in thread
From: Arvind Yadav @ 2017-07-06  9:43 UTC (permalink / raw)
  To: gregkh, mathieu.poirier; +Cc: linux-arm-kernel, linux-kernel

Sorry for noise. Please ignore this patch.


On Thursday 06 July 2017 02:45 PM, Arvind Yadav wrote:
> If CONFIG_CORESIGHT is disable, it'll through compilation error.
>
> drivers/hwtracing/coresight/coresight-etm-perf.c:462:5: error: redefinition of ‘etm_perf_symlink’
>   int etm_perf_symlink(struct coresight_device *csdev, bool link)
>       ^
> In file included from drivers/hwtracing/coresight/coresight-etm-perf.c:30:0:
> drivers/hwtracing/coresight/coresight-etm-perf.h:61:19: note: previous definition of ‘etm_perf_symlink’ was here
>   static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>   drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index e97775d..74ce6a5 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -458,7 +458,7 @@ static void etm_addr_filters_sync(struct perf_event *event)
>   
>   	filters->nr_filters = i;
>   }
> -
> +#ifdef CONFIG_CORESIGHT
>   int etm_perf_symlink(struct coresight_device *csdev, bool link)
>   {
>   	char entry[sizeof("cpu9999999")];
> @@ -483,7 +483,7 @@ int etm_perf_symlink(struct coresight_device *csdev, bool link)
>   
>   	return 0;
>   }
> -
> +#endif
>   static int __init etm_perf_init(void)
>   {
>   	int ret;

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

end of thread, other threads:[~2017-07-06  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06  9:15 [PATCH] input: coresight: Fix redefinition error on compilation Arvind Yadav
2017-07-06  9:43 ` Arvind Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®