Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

firmware: arm_scmi: Constify struct scmi_transport_ops

Mark struct scmi_transport_ops as const since this driver never modifies
it. Constifying moves it to read-only memory, improving hardening -
especially important for structures with function pointers.

x86_64 (allmodconfig) size diff:
Before:
text data bss dec hex filename
6907 680 48 7635 1dd3 drivers/firmware/arm_scmi/transports/optee.o

After:
text data bss dec hex filename
6987 576 48 7611 1dbb drivers/firmware/arm_scmi/transports/optee.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <881be6ad61037ed95d5e750a2565fd9840120a08.1753816459.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

authored by

Christophe JAILLET and committed by
Sudeep Holla
224dcf29 abd658d3

+1 -1
+1 -1
drivers/firmware/arm_scmi/transports/optee.c
··· 498 498 mutex_unlock(&channel->mu); 499 499 } 500 500 501 - static struct scmi_transport_ops scmi_optee_ops = { 501 + static const struct scmi_transport_ops scmi_optee_ops = { 502 502 .chan_available = scmi_optee_chan_available, 503 503 .chan_setup = scmi_optee_chan_setup, 504 504 .chan_free = scmi_optee_chan_free,