From: kernel test robot <lkp@intel.com>
To: Huisong Li <lihuisong@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] soc: kunpeng_hccs: fix some sparse warnings about incorrect type
Date: Wed, 16 Aug 2023 13:35:32 +0800 [thread overview]
Message-ID: <202308161305.yhPT7ksM-lkp@intel.com> (raw)
In-Reply-To: <20230815125233.65469-1-lihuisong@huawei.com>
Hi Huisong,
kernel test robot noticed the following build warnings:
[auto build test WARNING on soc/for-next]
[also build test WARNING on next-20230815]
[cannot apply to linus/master v6.5-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Huisong-Li/soc-kunpeng_hccs-fix-some-sparse-warnings-about-incorrect-type/20230815-205824
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link: https://lore.kernel.org/r/20230815125233.65469-1-lihuisong%40huawei.com
patch subject: [PATCH] soc: kunpeng_hccs: fix some sparse warnings about incorrect type
config: arm64-randconfig-r092-20230816 (https://download.01.org/0day-ci/archive/20230816/202308161305.yhPT7ksM-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230816/202308161305.yhPT7ksM-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308161305.yhPT7ksM-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/soc/hisilicon/kunpeng_hccs.c:203:37: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/soc/hisilicon/kunpeng_hccs.c:203:65: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *comm_space @@ got unsigned char [usertype] * @@
drivers/soc/hisilicon/kunpeng_hccs.c:203:65: sparse: expected void [noderef] __iomem *comm_space
drivers/soc/hisilicon/kunpeng_hccs.c:203:65: sparse: got unsigned char [usertype] *
vim +/__iomem +203 drivers/soc/hisilicon/kunpeng_hccs.c
198
199 static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
200 struct hccs_desc *desc)
201 {
202 struct hccs_mbox_client_info *cl_info = &hdev->cl_info;
> 203 void __iomem *comm_space = (u8 *)cl_info->pcc_comm_addr +
204 sizeof(struct acpi_pcct_shared_memory);
205 struct hccs_fw_inner_head *fw_inner_head;
206 struct acpi_pcct_shared_memory tmp = {0};
207 u16 comm_space_size;
208 int ret;
209
210 /* Write signature for this subspace */
211 tmp.signature = HCCS_PCC_SIGNATURE_MASK | hdev->chan_id;
212 /* Write to the shared command region */
213 tmp.command = cmd;
214 /* Clear cmd complete bit */
215 tmp.status = 0;
216 memcpy_toio(cl_info->pcc_comm_addr, (void *)&tmp,
217 sizeof(struct acpi_pcct_shared_memory));
218
219 /* Copy the message to the PCC comm space */
220 comm_space_size = HCCS_PCC_SHARE_MEM_BYTES -
221 sizeof(struct acpi_pcct_shared_memory);
222 memcpy_toio(comm_space, (void *)desc, comm_space_size);
223
224 /* Ring doorbell */
225 ret = mbox_send_message(cl_info->mbox_chan, &cmd);
226 if (ret < 0) {
227 dev_err(hdev->dev, "Send PCC mbox message failed, ret = %d.\n",
228 ret);
229 goto end;
230 }
231
232 /* Wait for completion */
233 ret = hccs_check_chan_cmd_complete(hdev);
234 if (ret)
235 goto end;
236
237 /* Copy response data */
238 memcpy_fromio((void *)desc, comm_space, comm_space_size);
239 fw_inner_head = &desc->rsp.fw_inner_head;
240 if (fw_inner_head->retStatus) {
241 dev_err(hdev->dev, "Execute PCC command failed, error code = %u.\n",
242 fw_inner_head->retStatus);
243 ret = -EIO;
244 }
245
246 end:
247 mbox_client_txdone(cl_info->mbox_chan, ret);
248 return ret;
249 }
250
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-08-16 5:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 12:52 [PATCH] soc: kunpeng_hccs: fix some sparse warnings about incorrect type Huisong Li
2023-08-15 12:52 ` Huisong Li
2023-08-16 5:35 ` kernel test robot [this message]
2023-08-16 7:37 ` [PATCH v2] " Huisong Li
2023-08-16 7:37 ` Huisong Li
2023-08-22 2:31 ` patchwork-bot+linux-soc
2023-08-16 13:17 ` [PATCH] " Arnd Bergmann
2023-08-16 13:17 ` Arnd Bergmann
2023-08-17 1:37 ` lihuisong (C)
2023-08-17 1:37 ` lihuisong (C)
2023-08-17 11:54 ` Arnd Bergmann
2023-08-17 11:54 ` Arnd Bergmann
2023-08-18 1:38 ` lihuisong (C)
2023-08-18 1:38 ` lihuisong (C)
2023-08-18 1:57 ` Arnd Bergmann
2023-08-18 1:57 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308161305.yhPT7ksM-lkp@intel.com \
--to=lkp@intel.com \
--cc=lihuisong@huawei.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.