From patchwork Mon Oct 9 15:20:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 13413894 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 6F913E95A9A for ; Mon, 9 Oct 2023 15:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ibSh8iik32epvbu/KHPFtgcwMinvy8zE0yMg7CqwWMM=; b=bGAdo8+t078ZET 9jisFk8YO9uhoKHjc4T2otX02S5AhMHRR+5B930VUf/wM6TGCJkrZ38YlbgjaXkAZ7BCLUefsC6UN B3O6vj2N6zQ9ZjMROlwDbEF14+20p9JaPhPFYSrigBkncLwYQ/tP0nDQXma2Bh5UlxPlKfl5lVqHJ uhCWSe62txlCRfuNYAV2BgSd6KQ4NXHttBYDEzE+yzxWprCsIcG+OJigb8Z07XgBqXRGzSr+z8OmY t7bD6msIWEMuOoLmuNVWOAoK7txc6weiflYSPLOZORD/kuNfkQq4E1rLj06gIe5CU+ejYM/ZFrmRL 7HDVhPH4kE5Rq5WTM/Ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qps4H-00B2gj-0U; Mon, 09 Oct 2023 15:21:13 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qps4D-00B2g2-1m for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2023 15:21:11 +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 9D8B71FB; Mon, 9 Oct 2023 08:21:32 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2E21F3F5A1; Mon, 9 Oct 2023 08:20:51 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org Cc: Sudeep Holla , andersson@kernel.org, Nikunj Kela , Cristian Marussi Subject: [PATCH] firmware: arm_scmi: Convert u32 to unsigned long to align with arm_smccc_1_1_invoke() Date: Mon, 9 Oct 2023 16:20:49 +0100 Message-ID: <20231009152049.1428872-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_082109_760938_1112F582 X-CRM114-Status: GOOD ( 11.29 ) 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 All the parameters to arm_smccc_1_1_invoke() are unsigned long which aligns well on both 32-bit and 64-bit Arm based platforms. Let us store all the members in the structure scmi_smc used as the parameters to the arm_smccc_1_1_invoke() call as unsigned long. Cc: Cristian Marussi Signed-off-by: Sudeep Holla Reviewed-by: Cristian Marussi --- drivers/firmware/arm_scmi/smc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c index c193516a254d..8eba60a41975 100644 --- a/drivers/firmware/arm_scmi/smc.c +++ b/drivers/firmware/arm_scmi/smc.c @@ -60,9 +60,9 @@ struct scmi_smc { struct mutex shmem_lock; #define INFLIGHT_NONE MSG_TOKEN_MAX atomic_t inflight; - u32 func_id; - u32 param_page; - u32 param_offset; + unsigned long func_id; + unsigned long param_page; + unsigned long param_offset; }; static irqreturn_t smc_msg_done_isr(int irq, void *data) @@ -211,8 +211,6 @@ static int smc_send_message(struct scmi_chan_info *cinfo, { struct scmi_smc *scmi_info = cinfo->transport_info; struct arm_smccc_res res; - unsigned long page = scmi_info->param_page; - unsigned long offset = scmi_info->param_offset; /* * Channel will be released only once response has been @@ -222,8 +220,8 @@ static int smc_send_message(struct scmi_chan_info *cinfo, shmem_tx_prepare(scmi_info->shmem, xfer, cinfo); - arm_smccc_1_1_invoke(scmi_info->func_id, page, offset, 0, 0, 0, 0, 0, - &res); + arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->param_page, + scmi_info->param_offset, 0, 0, 0, 0, 0, &res); /* Only SMCCC_RET_NOT_SUPPORTED is valid error code */ if (res.a0) {