diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2024-07-30 15:47:02 +0100 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2024-08-18 20:22:16 +0100 |
commit | 668f0cb2337f9fc5536a0880a8e13cc735efa00d (patch) | |
tree | 9f9f3dff0c2cd51b7d67797a9c1340e9f16cc351 | |
parent | a8bd37e645602afcafc9d5f428c10aeda606b279 (diff) | |
download | lwn-668f0cb2337f9fc5536a0880a8e13cc735efa00d.tar.gz lwn-668f0cb2337f9fc5536a0880a8e13cc735efa00d.zip |
firmware: arm_scmi: Remove const from transport descriptors
The descriptor structure scmi_desc contains a variety of fields related to
the transport functionalities and it is defined by the transport drivers
themselves; such elements, though, serve varied purposes and have different
lifetime.
In particular, while there are some of those elements that provide a
description of transport features that are supposed to be immutable, on
the other side there are present also some other characteristics that are
instead supposed to be configurable on a per-platform base since they
represent configuration features tied to the specific hardware/firmware
system.
The immutable fields are already qualified as const on the their own; get
rid of the structure-level const qualifier which is not needed, so as to
enable possible runtime customization of the mutable configuration
features.
No functional change.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-2-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r-- | drivers/firmware/arm_scmi/common.h | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/transports/mailbox.c | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/transports/optee.c | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/transports/smc.c | 2 | ||||
-rw-r--r-- | drivers/firmware/arm_scmi/transports/virtio.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index e44f7d1b4417..6d9227db473f 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -405,7 +405,7 @@ struct scmi_transport_core_operations { */ struct scmi_transport { struct device *supplier; - const struct scmi_desc *desc; + struct scmi_desc *desc; struct scmi_transport_core_operations **core_ops; }; diff --git a/drivers/firmware/arm_scmi/transports/mailbox.c b/drivers/firmware/arm_scmi/transports/mailbox.c index 917f9b8918d6..a481a2866062 100644 --- a/drivers/firmware/arm_scmi/transports/mailbox.c +++ b/drivers/firmware/arm_scmi/transports/mailbox.c @@ -355,7 +355,7 @@ static const struct scmi_transport_ops scmi_mailbox_ops = { .poll_done = mailbox_poll_done, }; -static const struct scmi_desc scmi_mailbox_desc = { +static struct scmi_desc scmi_mailbox_desc = { .ops = &scmi_mailbox_ops, .max_rx_timeout_ms = 30, /* We may increase this if required */ .max_msg = 20, /* Limited by MBOX_TX_QUEUE_LEN */ diff --git a/drivers/firmware/arm_scmi/transports/optee.c b/drivers/firmware/arm_scmi/transports/optee.c index 978750aaf6b7..56fc63edf51e 100644 --- a/drivers/firmware/arm_scmi/transports/optee.c +++ b/drivers/firmware/arm_scmi/transports/optee.c @@ -510,7 +510,7 @@ static int scmi_optee_ctx_match(struct tee_ioctl_version_data *ver, const void * return ver->impl_id == TEE_IMPL_ID_OPTEE; } -static const struct scmi_desc scmi_optee_desc = { +static struct scmi_desc scmi_optee_desc = { .ops = &scmi_optee_ops, .max_rx_timeout_ms = 30, .max_msg = 20, diff --git a/drivers/firmware/arm_scmi/transports/smc.c b/drivers/firmware/arm_scmi/transports/smc.c index 6fc3e1973c58..b7243939f161 100644 --- a/drivers/firmware/arm_scmi/transports/smc.c +++ b/drivers/firmware/arm_scmi/transports/smc.c @@ -273,7 +273,7 @@ static const struct scmi_transport_ops scmi_smc_ops = { .fetch_response = smc_fetch_response, }; -static const struct scmi_desc scmi_smc_desc = { +static struct scmi_desc scmi_smc_desc = { .ops = &scmi_smc_ops, .max_rx_timeout_ms = 30, .max_msg = 20, diff --git a/drivers/firmware/arm_scmi/transports/virtio.c b/drivers/firmware/arm_scmi/transports/virtio.c index c107579e7fe7..d349766bc0b2 100644 --- a/drivers/firmware/arm_scmi/transports/virtio.c +++ b/drivers/firmware/arm_scmi/transports/virtio.c @@ -790,7 +790,7 @@ static const struct scmi_transport_ops scmi_virtio_ops = { .poll_done = virtio_poll_done, }; -static const struct scmi_desc scmi_virtio_desc = { +static struct scmi_desc scmi_virtio_desc = { .ops = &scmi_virtio_ops, /* for non-realtime virtio devices */ .max_rx_timeout_ms = VIRTIO_MAX_RX_TIMEOUT_MS, |