From patchwork Tue Jul 30 14:47:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13747503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18E04C3DA7E for ; Tue, 30 Jul 2024 14:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b0hAKpXXBzA7CAGN8vgVpOxEvSFrZYt2ZRhamwLtH8k=; b=qmUi4i/cZLqL+kefCIqA8x4hJU aopaeo67+xPHpA9HMaKHom7pChVXOerfpOPvl7XOg57xhnrFwL9ST+gGG5D/WsFA3NHHpED7WvTSk xc6D7jtRm+acP/rTiRD7O1fd6VeDfF44NCgr0IwU6a0fuRPu9AvMU8jojHvGNVH6dhtNWm/7YVtf9 P6U8vo8qTUXQfwDnyx885bGGNmwsfx6YWKwmhIvg+M/q6i5I15hiYNkkbgTaksAFpPMP7xPEBW5og OjQUwxkmiB1VLhgXjZdYSSo16J9WKplond1V+3PAmwd0PoHi8i/wdLXu9i6p4eqk4Gt5b/PU0eJfv As7LuBWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYoAG-0000000FWd6-2Xzu; Tue, 30 Jul 2024 14:49:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYo8u-0000000FWAH-2yIb for linux-arm-kernel@lists.infradead.org; Tue, 30 Jul 2024 14:48:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D826106F; Tue, 30 Jul 2024 07:48:22 -0700 (PDT) Received: from pluto.guestnet.cambridge.arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2663B3F766; Tue, 30 Jul 2024 07:47:53 -0700 (PDT) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org, devicetree@vger.kernel.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, etienne.carriere@st.com, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, dan.carpenter@linaro.org, souvik.chakravarty@arm.com, robh@kernel.org, krzk+dt@kernel.org, Cristian Marussi Subject: [PATCH v1 1/6] firmware: arm_scmi: Remove const from transport descriptors Date: Tue, 30 Jul 2024 15:47:02 +0100 Message-ID: <20240730144707.1647025-2-cristian.marussi@arm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730144707.1647025-1-cristian.marussi@arm.com> References: <20240730144707.1647025-1-cristian.marussi@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_074800_880954_1E0C7C60 X-CRM114-Status: GOOD ( 16.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/firmware/arm_scmi/common.h | 2 +- drivers/firmware/arm_scmi/scmi_transport_mailbox.c | 2 +- drivers/firmware/arm_scmi/scmi_transport_optee.c | 2 +- drivers/firmware/arm_scmi/scmi_transport_smc.c | 2 +- drivers/firmware/arm_scmi/scmi_transport_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 77721cb4ac34..5261dc9b5f96 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -381,7 +381,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/scmi_transport_mailbox.c b/drivers/firmware/arm_scmi/scmi_transport_mailbox.c index 75483b6778ee..dc5ca894d5eb 100644 --- a/drivers/firmware/arm_scmi/scmi_transport_mailbox.c +++ b/drivers/firmware/arm_scmi/scmi_transport_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/scmi_transport_optee.c b/drivers/firmware/arm_scmi/scmi_transport_optee.c index 974128d73f2d..08911f40d1ff 100644 --- a/drivers/firmware/arm_scmi/scmi_transport_optee.c +++ b/drivers/firmware/arm_scmi/scmi_transport_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/scmi_transport_smc.c b/drivers/firmware/arm_scmi/scmi_transport_smc.c index 1c203a68acd4..c6c69a17a9cc 100644 --- a/drivers/firmware/arm_scmi/scmi_transport_smc.c +++ b/drivers/firmware/arm_scmi/scmi_transport_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/scmi_transport_virtio.c b/drivers/firmware/arm_scmi/scmi_transport_virtio.c index 55d7245fa7ee..d711ba6e07f6 100644 --- a/drivers/firmware/arm_scmi/scmi_transport_virtio.c +++ b/drivers/firmware/arm_scmi/scmi_transport_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,