All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Tao Zhang <quic_taozha@quicinc.com>,
	Mao Jinlong <quic_jinlmao@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Mike Leach <mike.leach@linaro.org>,
	Leo Yan <leo.yan@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Coresight: tpda/tpdm: remove incorrect __exit annotation
Date: Thu, 26 Jan 2023 17:35:14 +0100	[thread overview]
Message-ID: <20230126163530.3495413-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

'remove' callbacks get called whenever a device is unbound from
the driver, which can get triggered from user space.

Putting it into the __exit section means that the function gets
dropped in for built-in drivers, as pointed out by this build
warning:

`tpda_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpda.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpda.o
`tpdm_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpdm.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpdm.o

Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver")
Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hwtracing/coresight/coresight-tpda.c | 2 +-
 drivers/hwtracing/coresight/coresight-tpdm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
index 19c25c9f6157..382d648529e7 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.c
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -174,7 +174,7 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id)
 	return 0;
 }
 
-static void __exit tpda_remove(struct amba_device *adev)
+static void tpda_remove(struct amba_device *adev)
 {
 	struct tpda_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
index 349a82bb3270..9479a5e8c672 100644
--- a/drivers/hwtracing/coresight/coresight-tpdm.c
+++ b/drivers/hwtracing/coresight/coresight-tpdm.c
@@ -223,7 +223,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
 	return 0;
 }
 
-static void __exit tpdm_remove(struct amba_device *adev)
+static void tpdm_remove(struct amba_device *adev)
 {
 	struct tpdm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
-- 
2.39.0


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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Tao Zhang <quic_taozha@quicinc.com>,
	Mao Jinlong <quic_jinlmao@quicinc.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Mike Leach <mike.leach@linaro.org>,
	Leo Yan <leo.yan@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Coresight: tpda/tpdm: remove incorrect __exit annotation
Date: Thu, 26 Jan 2023 17:35:14 +0100	[thread overview]
Message-ID: <20230126163530.3495413-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

'remove' callbacks get called whenever a device is unbound from
the driver, which can get triggered from user space.

Putting it into the __exit section means that the function gets
dropped in for built-in drivers, as pointed out by this build
warning:

`tpda_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpda.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpda.o
`tpdm_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpdm.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpdm.o

Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver")
Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/hwtracing/coresight/coresight-tpda.c | 2 +-
 drivers/hwtracing/coresight/coresight-tpdm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
index 19c25c9f6157..382d648529e7 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.c
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -174,7 +174,7 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id)
 	return 0;
 }
 
-static void __exit tpda_remove(struct amba_device *adev)
+static void tpda_remove(struct amba_device *adev)
 {
 	struct tpda_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
index 349a82bb3270..9479a5e8c672 100644
--- a/drivers/hwtracing/coresight/coresight-tpdm.c
+++ b/drivers/hwtracing/coresight/coresight-tpdm.c
@@ -223,7 +223,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
 	return 0;
 }
 
-static void __exit tpdm_remove(struct amba_device *adev)
+static void tpdm_remove(struct amba_device *adev)
 {
 	struct tpdm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
-- 
2.39.0


             reply	other threads:[~2023-01-26 16:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 16:35 Arnd Bergmann [this message]
2023-01-26 16:35 ` [PATCH] Coresight: tpda/tpdm: remove incorrect __exit annotation Arnd Bergmann
2023-01-26 18:02 ` Suzuki K Poulose
2023-01-26 18:02   ` Suzuki K Poulose
2023-01-26 20:37   ` Arnd Bergmann
2023-01-26 20:37     ` Arnd Bergmann
2023-01-27 16:46     ` Suzuki K Poulose
2023-01-27 16:46       ` Suzuki K Poulose
2023-01-27 17:00       ` Arnd Bergmann
2023-01-27 17:00         ` Arnd Bergmann
2023-01-27 17:12         ` Suzuki K Poulose
2023-01-27 17:12           ` Suzuki K Poulose

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=20230126163530.3495413-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=coresight@lists.linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=quic_jinlmao@quicinc.com \
    --cc=quic_taozha@quicinc.com \
    --cc=suzuki.poulose@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.