Skip to contentSkip to conversation

acpi: EINJ: mark remove callback as non-__exit

PATCH In review Arnd Bergmann 3 participants 4 messages Mar 20, 2024 – Mar 26, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: EINJ: mark remove callback as non-__exit

From: Arnd Bergmann <[email protected]>

The remove callback of a device is called whenever it is unbound, which may happen during runtime e.g. through sysfs, so this is not allowed to be dropped from the binary:

WARNING: modpost: vmlinux: section mismatch in reference: einj_driver+0x8 (section: .data) -> einj_remove (section: .exit.text)
ERROR: modpost: Section mismatches detected.

Remove that annotation.

Fixes 12fb28ea6b1c ("EINJ: Add CXL error type support")
---
 drivers/acpi/apei/einj-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/apei/einj-core.c +1 -1
index 66e7f529e92f..01faca3a238a 100644
@@ -851,7 +851,7 @@ static int __init einj_probe(struct platform_device *pdev)
 	return rc;
 }
 
-static void __exit einj_remove(struct platform_device *pdev)
+static void einj_remove(struct platform_device *pdev)
 {
 	struct apei_exec_context ctx;
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The remove callback of a device is called whenever it is unbound, which may happen during runtime e.g. through sysfs, so this is not allowed to be dropped from the binary:

WARNING: modpost: vmlinux: section mismatch in reference: einj_driver+0x8 (section: .data) -> einj_remove (section: .exit.text)
ERROR: modpost: Section mismatches detected.

Remove that annotation.

Looks good, not sure why the build robots missed this while this was sitting in -next. Yes, this was a side effect of reusing the former einj_exit() as the device remove callback.

Rafael, can you pick this up?

#2 lore raw
Quoted 13 lines · Dan Williams
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The remove callback of a device is called whenever it is unbound, which may happen during runtime e.g. through sysfs, so this is not allowed to be dropped from the binary:

WARNING: modpost: vmlinux: section mismatch in reference: einj_driver+0x8 (section: .data) -> einj_remove (section: .exit.text)
ERROR: modpost: Section mismatches detected.

Remove that annotation.

Quoted 7 lines

Looks good, not sure why the build robots missed this while this was sitting in -next. Yes, this was a side effect of reusing the former einj_exit() as the device remove callback.

Rafael, can you pick this up?

I will, thanks!

#3 lore raw
Quoted 19 lines · Rafael J. Wysocki
Quoted 17 lines · Dan Williams
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The remove callback of a device is called whenever it is unbound, which may happen during runtime e.g. through sysfs, so this is not allowed to be dropped from the binary:

WARNING: modpost: vmlinux: section mismatch in reference: einj_driver+0x8 (section: .data) -> einj_remove (section: .exit.text)
ERROR: modpost: Section mismatches detected.

Remove that annotation.

Looks good, not sure why the build robots missed this while this was sitting in -next. Yes, this was a side effect of reusing the former einj_exit() as the device remove callback.

Quoted 5 lines
Quoted 3 lines

Rafael, can you pick this up?

I will, thanks!

Applied now, thanks!