[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210107111717.5571-3-ionela.voinescu@arm.com>
Date: Thu, 7 Jan 2021 11:17:16 +0000
From: Ionela Voinescu <ionela.voinescu@....com>
To: rjw@...ysocki.net, lenb@...nel.org, robert.moore@...el.com
Cc: viro@...iv.linux.org.uk, catalin.marinas@....com,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
ionela.voinescu@....com
Subject: [PATCH 2/3] acpi: cppc_acpi: add __iomem annotation to generic_comm_base pointer
ppc_comm_addr is a virtual address to the PCC space and it's annotated
with __iomem. Therefore, generic_comm_base which gets assigned the value of
pcc_comm_address should be annotated as well.
This already happens in check_pcc_chan(), but not in send_pcc_cmd(), which
results in the following sparse warnings:
drivers/acpi/cppc_acpi.c:237:18: warning: cast removes address space '__iomem' of expression
drivers/acpi/cppc_acpi.c:299:9: warning: incorrect type in argument 2 (different address spaces)
drivers/acpi/cppc_acpi.c:299:9: expected void volatile [noderef] __iomem *addr
drivers/acpi/cppc_acpi.c:299:9: got unsigned short *
drivers/acpi/cppc_acpi.c:302:9: warning: incorrect type in argument 2 (different address spaces)
drivers/acpi/cppc_acpi.c:302:9: expected void volatile [noderef] __iomem *addr
drivers/acpi/cppc_acpi.c:302:9: got unsigned short *
Signed-off-by: Ionela Voinescu <ionela.voinescu@....com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Len Brown <lenb@...nel.org>
---
drivers/acpi/cppc_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 75aaf94ae0a9..fd71020f5d5f 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -233,8 +233,8 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd)
{
int ret = -EIO, i;
struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id];
- struct acpi_pcct_shared_memory *generic_comm_base =
- (struct acpi_pcct_shared_memory *)pcc_ss_data->pcc_comm_addr;
+ struct acpi_pcct_shared_memory __iomem *generic_comm_base =
+ pcc_ss_data->pcc_comm_addr;
unsigned int time_delta;
/*
--
2.29.2.dirty
Powered by blists - more mailing lists