mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: gregkh@linuxfoundation.org, mathieu.poirier@linaro.org
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] input: coresight: Fix redefinition error on compilation.
Date: Thu,  6 Jul 2017 14:45:02 +0530	[thread overview]
Message-ID: <6333cde19a5c0adc8faf41531c2ae431cd79e7a6.1499332268.git.arvind.yadav.cs@gmail.com> (raw)

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

             reply	other threads:[~2017-07-06  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06  9:15 Arvind Yadav [this message]
2017-07-06  9:43 ` Arvind Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6333cde19a5c0adc8faf41531c2ae431cd79e7a6.1499332268.git.arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®