* [linux-next:master 3938/4500] drivers/soc/qcom/socinfo.c:322:36: sparse: sparse: cast to restricted __le32
@ 2021-01-18 9:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-18 9:30 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: kbuild-all, Linux Memory Management List, Bjorn Andersson
[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 93bf8b946e5f9a0b0c68155597b53fd8ccce2827
commit: 734c78e7febf879a79e9b34e38df35cc63794350 [3938/4500] soc: qcom: socinfo: add info from PMIC models array
config: i386-randconfig-s002-20210118 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=734c78e7febf879a79e9b34e38df35cc63794350
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 734c78e7febf879a79e9b34e38df35cc63794350
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/soc/qcom/socinfo.c:322:36: sparse: sparse: cast to restricted __le32
drivers/soc/qcom/socinfo.c:323:36: sparse: sparse: cast to restricted __le32
vim +322 drivers/soc/qcom/socinfo.c
304
305 static int qcom_show_pmic_model_array(struct seq_file *seq, void *p)
306 {
307 struct socinfo *socinfo = seq->private;
308 unsigned int num_pmics = le32_to_cpu(socinfo->num_pmics);
309 unsigned int pmic_array_offset = le32_to_cpu(socinfo->pmic_array_offset);
310 int i;
311 void *ptr = socinfo;
312
313 ptr += pmic_array_offset;
314
315 /* No need for bounds checking, it happened at socinfo_debugfs_init */
316 for (i = 0; i < num_pmics; i++) {
317 unsigned int model = SOCINFO_MINOR(get_unaligned_le32(ptr + 2 * i * sizeof(u32)));
318 unsigned int die_rev = get_unaligned_le32(ptr + (2 * i + 1) * sizeof(u32));
319
320 if (model <= ARRAY_SIZE(pmic_models) && pmic_models[model])
321 seq_printf(seq, "%s %u.%u\n", pmic_models[model],
> 322 SOCINFO_MAJOR(le32_to_cpu(die_rev)),
323 SOCINFO_MINOR(le32_to_cpu(die_rev)));
324 else
325 seq_printf(seq, "unknown (%d)\n", model);
326 }
327
328 return 0;
329 }
330
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49138 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-18 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 9:30 [linux-next:master 3938/4500] drivers/soc/qcom/socinfo.c:322:36: sparse: sparse: cast to restricted __le32 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox