]> Git Repo - linux.git/commitdiff
coresight: remove broken __exit annotations
authorArnd Bergmann <[email protected]>
Tue, 8 Dec 2020 18:26:50 +0000 (11:26 -0700)
committerGreg Kroah-Hartman <[email protected]>
Tue, 8 Dec 2020 18:57:19 +0000 (19:57 +0100)
Functions that are annotated __exit are discarded for built-in drivers,
but the .remove callback in a device driver must still be kept around
to allow bind/unbind operations.

There is now a linker warning for the discarded symbol references:

`tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o
`tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o
`etb_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etb10.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etb10.o
`static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
`dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
`static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
`dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
`catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o

Remove all those annotations.

Fixes: 8b0cf82677d1 ("coresight: stm: Allow to build coresight-stm as a module")
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/hwtracing/coresight/coresight-catu.c
drivers/hwtracing/coresight/coresight-cti-core.c
drivers/hwtracing/coresight/coresight-etb10.c
drivers/hwtracing/coresight/coresight-etm3x-core.c
drivers/hwtracing/coresight/coresight-etm4x-core.c
drivers/hwtracing/coresight/coresight-funnel.c
drivers/hwtracing/coresight/coresight-replicator.c
drivers/hwtracing/coresight/coresight-stm.c
drivers/hwtracing/coresight/coresight-tmc-core.c
drivers/hwtracing/coresight/coresight-tpiu.c

index 99430f6cf5a5d1ba0fc6d3de587056d7a7a37cf9..a61313f320bda220e54c41e7ef536edffb91474e 100644 (file)
@@ -567,7 +567,7 @@ out:
        return ret;
 }
 
-static int __exit catu_remove(struct amba_device *adev)
+static int catu_remove(struct amba_device *adev)
 {
        struct catu_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index d28eae93e55c8e26d2f159310633ff323af73759..61dbc1afd8da506a84f6ade2b58be670f1c651bf 100644 (file)
@@ -836,7 +836,7 @@ static void cti_device_release(struct device *dev)
        if (drvdata->csdev_release)
                drvdata->csdev_release(dev);
 }
-static int __exit cti_remove(struct amba_device *adev)
+static int cti_remove(struct amba_device *adev)
 {
        struct cti_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index 1b320ab581caf061357edc21afb3bffe020a8862..0cf6f0b947b6f8849d3732f9e0fa7a062e245323 100644 (file)
@@ -803,7 +803,7 @@ err_misc_register:
        return ret;
 }
 
-static int __exit etb_remove(struct amba_device *adev)
+static int etb_remove(struct amba_device *adev)
 {
        struct etb_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index 47f610b1c2b18ab48fd82f477871792ed7f129a3..5bf5a5a4ce6d15265831afac116f193ca2ea4026 100644 (file)
@@ -902,14 +902,14 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
        return 0;
 }
 
-static void __exit clear_etmdrvdata(void *info)
+static void clear_etmdrvdata(void *info)
 {
        int cpu = *(int *)info;
 
        etmdrvdata[cpu] = NULL;
 }
 
-static int __exit etm_remove(struct amba_device *adev)
+static int etm_remove(struct amba_device *adev)
 {
        struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index d78a37b6592c622a219589adb4894386499d1d95..3ad5c2a01033e4228151d0bbb8b0b3de9f36edcf 100644 (file)
@@ -1575,14 +1575,14 @@ static struct amba_cs_uci_id uci_id_etm4[] = {
        }
 };
 
-static void __exit clear_etmdrvdata(void *info)
+static void clear_etmdrvdata(void *info)
 {
        int cpu = *(int *)info;
 
        etmdrvdata[cpu] = NULL;
 }
 
-static int __exit etm4_remove(struct amba_device *adev)
+static int etm4_remove(struct amba_device *adev)
 {
        struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index 39be46b74dfe6d0992591550686bf843c6c48ca4..071c723227dbdadddb10ccc33f52100b7bf3604d 100644 (file)
@@ -274,7 +274,7 @@ out_disable_clk:
        return ret;
 }
 
-static int __exit funnel_remove(struct device *dev)
+static int funnel_remove(struct device *dev)
 {
        struct funnel_drvdata *drvdata = dev_get_drvdata(dev);
 
@@ -328,7 +328,7 @@ static int static_funnel_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int __exit static_funnel_remove(struct platform_device *pdev)
+static int static_funnel_remove(struct platform_device *pdev)
 {
        funnel_remove(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
@@ -370,7 +370,7 @@ static int dynamic_funnel_probe(struct amba_device *adev,
        return funnel_probe(&adev->dev, &adev->res);
 }
 
-static int __exit dynamic_funnel_remove(struct amba_device *adev)
+static int dynamic_funnel_remove(struct amba_device *adev)
 {
        return funnel_remove(&adev->dev);
 }
index 6772f23e5c4b1d87956cc8cd2d13480df8695800..7e2a2b7f503f4340ff5d3873a28155769546318d 100644 (file)
@@ -291,7 +291,7 @@ out_disable_clk:
        return ret;
 }
 
-static int __exit replicator_remove(struct device *dev)
+static int replicator_remove(struct device *dev)
 {
        struct replicator_drvdata *drvdata = dev_get_drvdata(dev);
 
@@ -318,7 +318,7 @@ static int static_replicator_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int __exit static_replicator_remove(struct platform_device *pdev)
+static int static_replicator_remove(struct platform_device *pdev)
 {
        replicator_remove(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
@@ -388,7 +388,7 @@ static int dynamic_replicator_probe(struct amba_device *adev,
        return replicator_probe(&adev->dev, &adev->res);
 }
 
-static int __exit dynamic_replicator_remove(struct amba_device *adev)
+static int dynamic_replicator_remove(struct amba_device *adev)
 {
        return replicator_remove(&adev->dev);
 }
index 32d29704206b3caecaf219ccc8d38d3ec981b1f0..99791773f682ff561119953fc304b1fa7bf10263 100644 (file)
@@ -951,7 +951,7 @@ stm_unregister:
        return ret;
 }
 
-static int __exit stm_remove(struct amba_device *adev)
+static int stm_remove(struct amba_device *adev)
 {
        struct stm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index 5653e0945c74b66d25e5ab54d8b018132f868f32..8169dff5a9f6a789552d61bf0db7f5bcc2c11185 100644 (file)
@@ -559,7 +559,7 @@ out:
        spin_unlock_irqrestore(&drvdata->spinlock, flags);
 }
 
-static int __exit tmc_remove(struct amba_device *adev)
+static int tmc_remove(struct amba_device *adev)
 {
        struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
index 010762a460871d21574dd7efd0fe74b1d5243f4d..d5dfee9ee55698b8606da6ad107e9618f1614631 100644 (file)
@@ -173,7 +173,7 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
        return PTR_ERR(drvdata->csdev);
 }
 
-static int __exit tpiu_remove(struct amba_device *adev)
+static int tpiu_remove(struct amba_device *adev)
 {
        struct tpiu_drvdata *drvdata = dev_get_drvdata(&adev->dev);
 
This page took 0.089732 seconds and 4 git commands to generate.