]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Remove __exit annotation
authorArnd Bergmann <arnd@arndb.de>
Mon, 20 Sep 2021 10:02:52 +0000 (12:02 +0200)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 20 Sep 2021 11:01:54 +0000 (12:01 +0100)
commit16061c784670aaadde49a8f1e47d8ab680a02e1b
tree850922b7aa26748c31803a69e7637542cca85086
parent3e6104a0483706aa9a78636df3cc342b1ea9e7df
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/20210920100301.1466486-2-arnd@kernel.org
Fixes: 5c0279bd1b6b ("firmware: arm_scmi: Add virtio transport")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/virtio.c