Skip to content

Commit 348ddab

Browse files
Uwe Kleine-KönigSuzuki K Poulose
authored andcommitted
coresight: etm4x: Remove bogous __exit annotation for some functions
etm4_platform_driver (which lives in ".data" contains a reference to etm4_remove_platform_dev(). So the latter must not be marked with __exit which results in the function being discarded for a build with CONFIG_CORESIGHT_SOURCE_ETM4X=y which in turn makes the remove pointer contain invalid data. etm4x_amba_driver referencing etm4_remove_amba() has the same issue. Drop the __exit annotations for the two affected functions and a third one that is called by the other two. For reasons I don't understand this isn't catched by building with CONFIG_DEBUG_SECTION_MISMATCH=y. Fixes: c23bc38 ("coresight: etm4x: Refactor probing routine") Fixes: 5214b56 ("coresight: etm4x: Add support for sysreg only devices") Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: James Clark <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Suzuki K Poulose <[email protected]>
1 parent b85ea95 commit 348ddab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ static void clear_etmdrvdata(void *info)
22242224
per_cpu(delayed_probe, cpu) = NULL;
22252225
}
22262226

2227-
static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
2227+
static void etm4_remove_dev(struct etmv4_drvdata *drvdata)
22282228
{
22292229
bool had_delayed_probe;
22302230
/*
@@ -2253,15 +2253,15 @@ static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata)
22532253
}
22542254
}
22552255

2256-
static void __exit etm4_remove_amba(struct amba_device *adev)
2256+
static void etm4_remove_amba(struct amba_device *adev)
22572257
{
22582258
struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev);
22592259

22602260
if (drvdata)
22612261
etm4_remove_dev(drvdata);
22622262
}
22632263

2264-
static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
2264+
static int etm4_remove_platform_dev(struct platform_device *pdev)
22652265
{
22662266
struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
22672267

0 commit comments

Comments
 (0)