lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/remoteproc/qcom_common.c:126:27: sparse: sparse: restricted __le32 degrades to integer
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4a0225c3d208cfa6e4550f2210ffd9114a952a81
commit: 8ed8485c4f056d488d17a2b56581c86aeb42955d remoteproc: qcom: Add capability to collect minidumps
date: 5 months ago
config: arm64-randconfig-s031-20210427 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ed8485c4f056d488d17a2b56581c86aeb42955d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8ed8485c4f056d488d17a2b56581c86aeb42955d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arm64

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/remoteproc/qcom_common.c:126:27: sparse: sparse: restricted __le32 degrades to integer
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast to restricted __le32
>> drivers/remoteproc/qcom_common.c:133:32: sparse: sparse: cast from restricted __le64

vim +126 drivers/remoteproc/qcom_common.c

103
104 static int qcom_add_minidump_segments(struct rproc *rproc, struct minidump_subsystem *subsystem)
105 {
106 struct minidump_region __iomem *ptr;
107 struct minidump_region region;
108 int seg_cnt, i;
109 dma_addr_t da;
110 size_t size;
111 char *name;
112
113 if (WARN_ON(!list_empty(&rproc->dump_segments))) {
114 dev_err(&rproc->dev, "dump segment list already populated\n");
115 return -EUCLEAN;
116 }
117
118 seg_cnt = le32_to_cpu(subsystem->region_count);
119 ptr = ioremap((unsigned long)le64_to_cpu(subsystem->regions_baseptr),
120 seg_cnt * sizeof(struct minidump_region));
121 if (!ptr)
122 return -EFAULT;
123
124 for (i = 0; i < seg_cnt; i++) {
125 memcpy_fromio(&region, ptr + i, sizeof(region));
> 126 if (region.valid == MD_REGION_VALID) {
127 name = kstrdup(region.name, GFP_KERNEL);
128 if (!name) {
129 iounmap(ptr);
130 return -ENOMEM;
131 }
132 da = le64_to_cpu(region.address);
> 133 size = le32_to_cpu(region.size);
134 rproc_coredump_add_custom_segment(rproc, da, size, NULL, name);
135 }
136 }
137
138 iounmap(ptr);
139 return 0;
140 }
141

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-04-27 09:27    [W:0.042 / U:3.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site