Coresight: tpda/tpdm: remove incorrect __exit annotation
authorArnd Bergmann <arnd@arndb.de>
Thu, 26 Jan 2023 16:35:14 +0000 (17:35 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 26 Jan 2023 18:17:42 +0000 (18:17 +0000)
'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>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230126163530.3495413-1-arnd@kernel.org
drivers/hwtracing/coresight/coresight-tpda.c
drivers/hwtracing/coresight/coresight-tpdm.c

index 19c25c9f61578658c848a7f0be847b40cdabbab1..382d648529e72f576b3869c672ace3871882b7ec 100644 (file)
@@ -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);
 
index 349a82bb32705dc1f90b0e4e71fa7098aae254ad..9479a5e8c6721d032da51b754b81ec7357067878 100644 (file)
@@ -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);