soc: kunpeng_hccs: fix some sparse warnings about incorrect type

This patch fixes some sparse warnings about incorrect type.
The address about PCC communication space should use '__iomem' tag.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308151142.dH5Muhva-lkp@intel.com/
Fixes: 886bdf9c88 ("soc: hisilicon: Support HCCS driver on Kunpeng SoC")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://lore.kernel.org/r/20230816073706.33297-1-lihuisong@huawei.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Huisong Li
2023-08-16 15:37:06 +08:00
committed by Arnd Bergmann
parent 67694c076b
commit 7d6612834d
2 changed files with 8 additions and 7 deletions

View File

@@ -156,8 +156,8 @@ static int hccs_register_pcc_channel(struct hccs_dev *hdev)
} }
if (pcc_chan->shmem_base_addr) { if (pcc_chan->shmem_base_addr) {
cl_info->pcc_comm_addr = (void __force *)ioremap( cl_info->pcc_comm_addr = ioremap(pcc_chan->shmem_base_addr,
pcc_chan->shmem_base_addr, pcc_chan->shmem_size); pcc_chan->shmem_size);
if (!cl_info->pcc_comm_addr) { if (!cl_info->pcc_comm_addr) {
dev_err(dev, "Failed to ioremap PCC communication region for channel-%d.\n", dev_err(dev, "Failed to ioremap PCC communication region for channel-%d.\n",
hdev->chan_id); hdev->chan_id);
@@ -177,7 +177,8 @@ out:
static int hccs_check_chan_cmd_complete(struct hccs_dev *hdev) static int hccs_check_chan_cmd_complete(struct hccs_dev *hdev)
{ {
struct hccs_mbox_client_info *cl_info = &hdev->cl_info; struct hccs_mbox_client_info *cl_info = &hdev->cl_info;
struct acpi_pcct_shared_memory *comm_base = cl_info->pcc_comm_addr; struct acpi_pcct_shared_memory __iomem *comm_base =
cl_info->pcc_comm_addr;
u16 status; u16 status;
int ret; int ret;
@@ -199,8 +200,8 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
struct hccs_desc *desc) struct hccs_desc *desc)
{ {
struct hccs_mbox_client_info *cl_info = &hdev->cl_info; struct hccs_mbox_client_info *cl_info = &hdev->cl_info;
struct acpi_pcct_shared_memory *comm_base = cl_info->pcc_comm_addr; void __iomem *comm_space = cl_info->pcc_comm_addr +
void *comm_space = (void *)(comm_base + 1); sizeof(struct acpi_pcct_shared_memory);
struct hccs_fw_inner_head *fw_inner_head; struct hccs_fw_inner_head *fw_inner_head;
struct acpi_pcct_shared_memory tmp = {0}; struct acpi_pcct_shared_memory tmp = {0};
u16 comm_space_size; u16 comm_space_size;
@@ -212,7 +213,7 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
tmp.command = cmd; tmp.command = cmd;
/* Clear cmd complete bit */ /* Clear cmd complete bit */
tmp.status = 0; tmp.status = 0;
memcpy_toio(comm_base, (void *)&tmp, memcpy_toio(cl_info->pcc_comm_addr, (void *)&tmp,
sizeof(struct acpi_pcct_shared_memory)); sizeof(struct acpi_pcct_shared_memory));
/* Copy the message to the PCC comm space */ /* Copy the message to the PCC comm space */

View File

@@ -50,7 +50,7 @@ struct hccs_mbox_client_info {
struct mbox_chan *mbox_chan; struct mbox_chan *mbox_chan;
struct pcc_mbox_chan *pcc_chan; struct pcc_mbox_chan *pcc_chan;
u64 deadline_us; u64 deadline_us;
void *pcc_comm_addr; void __iomem *pcc_comm_addr;
}; };
struct hccs_dev { struct hccs_dev {