Skip to content

Commit 1cd7320

Browse files
arndbsudeep-holla
authored andcommitted
firmware: arm_scmi: Remove __exit annotation
virtio_scmi_exit() is only called from __exit function, so the annotation is correct, but when the driver is built-in, the section gets discarded and the reference from a callback pointer causes a link-time error: `virtio_scmi_exit' referenced in section `.rodata' of drivers/firmware/arm_scmi/virtio.o: defined in discarded section `.exit.text' of drivers/firmware/arm_scmi/virtio.o I could not figure out a better workaround, so let's just remove that annotation even if it wastes a couple of bytes in .text. Link: https://lore.kernel.org/r/[email protected] Fixes: 46abe13 ("firmware: arm_scmi: Add virtio transport") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent c90521a commit 1cd7320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/arm_scmi/virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int __init virtio_scmi_init(void)
476476
return register_virtio_driver(&virtio_scmi_driver);
477477
}
478478

479-
static void __exit virtio_scmi_exit(void)
479+
static void virtio_scmi_exit(void)
480480
{
481481
unregister_virtio_driver(&virtio_scmi_driver);
482482
}

0 commit comments

Comments
 (0)