From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 7463/11648] drivers/hid/surface-hid/surface_hid_core.c:171:29: sparse: sparse: cast from restricted __le16
Date: Sun, 11 Apr 2021 13:37:26 +0800 [thread overview]
Message-ID: <202104111323.LS2nSMig-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4402 bytes --]
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/commit/?id=b05ff1002a5c19f2fd511c6eada6f475ff701841
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@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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36654 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Maximilian Luz <luzmaximilian@gmail.com>
Cc: kbuild-all@lists.01.org,
"Linux Memory Management List" <linux-mm@kvack.org>,
"Jiri Kosina" <jkosina@suse.cz>, "Blaž Hrastnik" <blaz@mxxn.io>
Subject: [linux-next:master 7463/11648] drivers/hid/surface-hid/surface_hid_core.c:171:29: sparse: sparse: cast from restricted __le16
Date: Sun, 11 Apr 2021 13:37:26 +0800 [thread overview]
Message-ID: <202104111323.LS2nSMig-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4319 bytes --]
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/commit/?id=b05ff1002a5c19f2fd511c6eada6f475ff701841
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@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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36654 bytes --]
next reply other threads:[~2021-04-11 5:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 5:37 kernel test robot [this message]
2021-04-11 5:37 ` [linux-next:master 7463/11648] drivers/hid/surface-hid/surface_hid_core.c:171:29: sparse: sparse: cast from restricted __le16 kernel test robot
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=202104111323.LS2nSMig-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.