Skip to content

Commit 45fe7be

Browse files
arndbgregkh
authored andcommitted
coresight: remove broken __exit annotations
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: 8b0cf82 ("coresight: stm: Allow to build coresight-stm as a module") Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20201208182651.1597945-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 83be0b8 commit 45fe7be

10 files changed

Lines changed: 16 additions & 16 deletions

‎drivers/hwtracing/coresight/coresight-catu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id)
567567
return ret;
568568
}
569569

570-
static int __exit catu_remove(struct amba_device *adev)
570+
static int catu_remove(struct amba_device *adev)
571571
{
572572
struct catu_drvdata *drvdata = dev_get_drvdata(&adev->dev);
573573

‎drivers/hwtracing/coresight/coresight-cti-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static void cti_device_release(struct device *dev)
836836
if (drvdata->csdev_release)
837837
drvdata->csdev_release(dev);
838838
}
839-
static int __exit cti_remove(struct amba_device *adev)
839+
static int cti_remove(struct amba_device *adev)
840840
{
841841
struct cti_drvdata *drvdata = dev_get_drvdata(&adev->dev);
842842

‎drivers/hwtracing/coresight/coresight-etb10.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
803803
return ret;
804804
}
805805

806-
static int __exit etb_remove(struct amba_device *adev)
806+
static int etb_remove(struct amba_device *adev)
807807
{
808808
struct etb_drvdata *drvdata = dev_get_drvdata(&adev->dev);
809809

‎drivers/hwtracing/coresight/coresight-etm3x-core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,14 +902,14 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
902902
return 0;
903903
}
904904

905-
static void __exit clear_etmdrvdata(void *info)
905+
static void clear_etmdrvdata(void *info)
906906
{
907907
int cpu = *(int *)info;
908908

909909
etmdrvdata[cpu] = NULL;
910910
}
911911

912-
static int __exit etm_remove(struct amba_device *adev)
912+
static int etm_remove(struct amba_device *adev)
913913
{
914914
struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
915915

‎drivers/hwtracing/coresight/coresight-etm4x-core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,14 +1575,14 @@ static struct amba_cs_uci_id uci_id_etm4[] = {
15751575
}
15761576
};
15771577

1578-
static void __exit clear_etmdrvdata(void *info)
1578+
static void clear_etmdrvdata(void *info)
15791579
{
15801580
int cpu = *(int *)info;
15811581

15821582
etmdrvdata[cpu] = NULL;
15831583
}
15841584

1585-
static int __exit etm4_remove(struct amba_device *adev)
1585+
static int etm4_remove(struct amba_device *adev)
15861586
{
15871587
struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
15881588

‎drivers/hwtracing/coresight/coresight-funnel.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static int funnel_probe(struct device *dev, struct resource *res)
274274
return ret;
275275
}
276276

277-
static int __exit funnel_remove(struct device *dev)
277+
static int funnel_remove(struct device *dev)
278278
{
279279
struct funnel_drvdata *drvdata = dev_get_drvdata(dev);
280280

@@ -328,7 +328,7 @@ static int static_funnel_probe(struct platform_device *pdev)
328328
return ret;
329329
}
330330

331-
static int __exit static_funnel_remove(struct platform_device *pdev)
331+
static int static_funnel_remove(struct platform_device *pdev)
332332
{
333333
funnel_remove(&pdev->dev);
334334
pm_runtime_disable(&pdev->dev);
@@ -370,7 +370,7 @@ static int dynamic_funnel_probe(struct amba_device *adev,
370370
return funnel_probe(&adev->dev, &adev->res);
371371
}
372372

373-
static int __exit dynamic_funnel_remove(struct amba_device *adev)
373+
static int dynamic_funnel_remove(struct amba_device *adev)
374374
{
375375
return funnel_remove(&adev->dev);
376376
}

‎drivers/hwtracing/coresight/coresight-replicator.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int replicator_probe(struct device *dev, struct resource *res)
291291
return ret;
292292
}
293293

294-
static int __exit replicator_remove(struct device *dev)
294+
static int replicator_remove(struct device *dev)
295295
{
296296
struct replicator_drvdata *drvdata = dev_get_drvdata(dev);
297297

@@ -318,7 +318,7 @@ static int static_replicator_probe(struct platform_device *pdev)
318318
return ret;
319319
}
320320

321-
static int __exit static_replicator_remove(struct platform_device *pdev)
321+
static int static_replicator_remove(struct platform_device *pdev)
322322
{
323323
replicator_remove(&pdev->dev);
324324
pm_runtime_disable(&pdev->dev);
@@ -388,7 +388,7 @@ static int dynamic_replicator_probe(struct amba_device *adev,
388388
return replicator_probe(&adev->dev, &adev->res);
389389
}
390390

391-
static int __exit dynamic_replicator_remove(struct amba_device *adev)
391+
static int dynamic_replicator_remove(struct amba_device *adev)
392392
{
393393
return replicator_remove(&adev->dev);
394394
}

‎drivers/hwtracing/coresight/coresight-stm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
951951
return ret;
952952
}
953953

954-
static int __exit stm_remove(struct amba_device *adev)
954+
static int stm_remove(struct amba_device *adev)
955955
{
956956
struct stm_drvdata *drvdata = dev_get_drvdata(&adev->dev);
957957

‎drivers/hwtracing/coresight/coresight-tmc-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static void tmc_shutdown(struct amba_device *adev)
559559
spin_unlock_irqrestore(&drvdata->spinlock, flags);
560560
}
561561

562-
static int __exit tmc_remove(struct amba_device *adev)
562+
static int tmc_remove(struct amba_device *adev)
563563
{
564564
struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev);
565565

‎drivers/hwtracing/coresight/coresight-tpiu.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
173173
return PTR_ERR(drvdata->csdev);
174174
}
175175

176-
static int __exit tpiu_remove(struct amba_device *adev)
176+
static int tpiu_remove(struct amba_device *adev)
177177
{
178178
struct tpiu_drvdata *drvdata = dev_get_drvdata(&adev->dev);
179179

0 commit comments

Comments
 (0)