tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e99d8a8495175df8cb8b739f8cf9b0fc9d0cd3b5
commit: b05ff1002a5c19f2fd511c6eada6f475ff701841 [7463/11648] HID: Add support for Surface
Aggregator Module HID transport
config: arm64-randconfig-s032-20210411 (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-279-g6d5d9b42-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
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 b05ff1002a5c19f2fd511c6eada6f475ff701841
# 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__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> drivers/hid/surface-hid/surface_hid_core.c:171:29: sparse:
sparse: cast from restricted __le16
> drivers/hid/surface-hid/surface_hid_core.c:171:27: sparse: sparse: incorrect type in
assignment (different base types) @@ expected unsigned int [usertype] vendor @@
got restricted __le16 [usertype] @@
drivers/hid/surface-hid/surface_hid_core.c:171:27: sparse: expected unsigned int
[usertype] vendor
drivers/hid/surface-hid/surface_hid_core.c:171:27: sparse: got restricted __le16
[usertype]
drivers/hid/surface-hid/surface_hid_core.c:172:30: sparse: sparse: cast from restricted
__le16
> drivers/hid/surface-hid/surface_hid_core.c:172:28: sparse:
sparse: incorrect type in assignment (different base types) @@ expected unsigned int
[usertype] product @@ got restricted __le16 [usertype] @@
drivers/hid/surface-hid/surface_hid_core.c:172:28: sparse: expected unsigned int
[usertype] product
drivers/hid/surface-hid/surface_hid_core.c:172:28: sparse: got restricted __le16
[usertype]
drivers/hid/surface-hid/surface_hid_core.c:173:30: sparse: sparse: cast from restricted
__le16
> drivers/hid/surface-hid/surface_hid_core.c:173:28: sparse:
sparse: incorrect type in assignment (different base types) @@ expected unsigned int
[usertype] version @@ got restricted __le16 [usertype] @@
drivers/hid/surface-hid/surface_hid_core.c:173:28: sparse: expected unsigned int
[usertype] version
drivers/hid/surface-hid/surface_hid_core.c:173:28: sparse: got restricted __le16
[usertype]
vim +171 drivers/hid/surface-hid/surface_hid_core.c
152
153 int surface_hid_device_add(struct surface_hid_device *shid)
154 {
155 int status;
156
157 status = surface_hid_load_hid_descriptor(shid);
158 if (status)
159 return status;
160
161 status = surface_hid_load_device_attributes(shid);
162 if (status)
163 return status;
164
165 shid->hid = hid_allocate_device();
166 if (IS_ERR(shid->hid))
167 return PTR_ERR(shid->hid);
168
169 shid->hid->dev.parent = shid->dev;
170 shid->hid->bus = BUS_HOST;
171 shid->hid->vendor = cpu_to_le16(shid->attrs.vendor);
172 shid->hid->product = cpu_to_le16(shid->attrs.product);
173 shid->hid->version = cpu_to_le16(shid->hid_desc.hid_version);
174 shid->hid->country = shid->hid_desc.country_code;
175
176 snprintf(shid->hid->name, sizeof(shid->hid->name), "Microsoft
Surface %04X:%04X",
177 shid->hid->vendor, shid->hid->product);
178
179 strscpy(shid->hid->phys, dev_name(shid->dev),
sizeof(shid->hid->phys));
180
181 shid->hid->driver_data = shid;
182 shid->hid->ll_driver = &surface_hid_ll_driver;
183
184 status = hid_add_device(shid->hid);
185 if (status)
186 hid_destroy_device(shid->hid);
187
188 return status;
189 }
190 EXPORT_SYMBOL_GPL(surface_hid_device_add);
191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org