* drivers/hid/hid-lenovo-go.c:295:18: sparse: warning: Initializer entry defined twice
@ 2026-12-02 13:09 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-02 13:09 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/hid/hid-lenovo-go.c:295:18: sparse: warning: Initializer entry defined twice"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Derek J. Clark" <derekjohn.clark@gmail.com>
CC: Jiri Kosina <jikos@kernel.org>
CC: Mark Pearson <mpearson-lenovo@squebb.ca>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 693c2e04e3f1d4c59af236e1211b7b8cb165a790
commit: d69ccfcbc9551988190895bc125a8bf709aa5931 HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver
date: 9 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 9 months ago
config: alpha-randconfig-r2311-20261202 (https://download.01.org/0day-ci/archive/20261202/20261202140440.0ZQcstIf-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.4.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261202/20261202140440.0ZQcstIf-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
| Fixes: d69ccfcbc955 ("HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261202140440.0ZQcstIf-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/hid/hid-lenovo-go.c:295:18: sparse: warning: Initializer entry defined twice
drivers/hid/hid-lenovo-go.c:295:18: sparse: also defined here
vim +295 drivers/hid/hid-lenovo-go.c
d69ccfcbc95519 Derek J. Clark 2026-03-10 280
d69ccfcbc95519 Derek J. Clark 2026-03-10 281 static int mcu_property_out(struct hid_device *hdev, u8 id, u8 command,
d69ccfcbc95519 Derek J. Clark 2026-03-10 282 u8 index, enum dev_type device, u8 *data, size_t len)
d69ccfcbc95519 Derek J. Clark 2026-03-10 283 {
d69ccfcbc95519 Derek J. Clark 2026-03-10 284 unsigned char *dmabuf __free(kfree) = NULL;
d69ccfcbc95519 Derek J. Clark 2026-03-10 285 u8 header[] = { GO_OUTPUT_REPORT_ID, id, command, index, device };
d69ccfcbc95519 Derek J. Clark 2026-03-10 286 size_t header_size = ARRAY_SIZE(header);
d69ccfcbc95519 Derek J. Clark 2026-03-10 287 int timeout = 50;
d69ccfcbc95519 Derek J. Clark 2026-03-10 288 int ret;
d69ccfcbc95519 Derek J. Clark 2026-03-10 289
d69ccfcbc95519 Derek J. Clark 2026-03-10 290 if (header_size + len > GO_PACKET_SIZE)
d69ccfcbc95519 Derek J. Clark 2026-03-10 291 return -EINVAL;
d69ccfcbc95519 Derek J. Clark 2026-03-10 292
d69ccfcbc95519 Derek J. Clark 2026-03-10 293 guard(mutex)(&drvdata.cfg_mutex);
d69ccfcbc95519 Derek J. Clark 2026-03-10 294 /* We can't use a devm_alloc reusable buffer without side effects during suspend */
d69ccfcbc95519 Derek J. Clark 2026-03-10 @295 dmabuf = kzalloc(GO_PACKET_SIZE, GFP_KERNEL);
d69ccfcbc95519 Derek J. Clark 2026-03-10 296 if (!dmabuf)
d69ccfcbc95519 Derek J. Clark 2026-03-10 297 return -ENOMEM;
d69ccfcbc95519 Derek J. Clark 2026-03-10 298
d69ccfcbc95519 Derek J. Clark 2026-03-10 299 memcpy(dmabuf, header, header_size);
d69ccfcbc95519 Derek J. Clark 2026-03-10 300 memcpy(dmabuf + header_size, data, len);
d69ccfcbc95519 Derek J. Clark 2026-03-10 301
d69ccfcbc95519 Derek J. Clark 2026-03-10 302 dev_dbg(&hdev->dev, "Send data as raw output report: [%*ph]\n",
d69ccfcbc95519 Derek J. Clark 2026-03-10 303 GO_PACKET_SIZE, dmabuf);
d69ccfcbc95519 Derek J. Clark 2026-03-10 304
d69ccfcbc95519 Derek J. Clark 2026-03-10 305 ret = hid_hw_output_report(hdev, dmabuf, GO_PACKET_SIZE);
d69ccfcbc95519 Derek J. Clark 2026-03-10 306 if (ret < 0)
d69ccfcbc95519 Derek J. Clark 2026-03-10 307 return ret;
d69ccfcbc95519 Derek J. Clark 2026-03-10 308
d69ccfcbc95519 Derek J. Clark 2026-03-10 309 ret = ret == GO_PACKET_SIZE ? 0 : -EINVAL;
d69ccfcbc95519 Derek J. Clark 2026-03-10 310 if (ret)
d69ccfcbc95519 Derek J. Clark 2026-03-10 311 return ret;
d69ccfcbc95519 Derek J. Clark 2026-03-10 312
d69ccfcbc95519 Derek J. Clark 2026-03-10 313 ret = wait_for_completion_interruptible_timeout(&drvdata.send_cmd_complete,
d69ccfcbc95519 Derek J. Clark 2026-03-10 314 msecs_to_jiffies(timeout));
d69ccfcbc95519 Derek J. Clark 2026-03-10 315
d69ccfcbc95519 Derek J. Clark 2026-03-10 316 if (ret == 0) /* timeout occurred */
d69ccfcbc95519 Derek J. Clark 2026-03-10 317 ret = -EBUSY;
d69ccfcbc95519 Derek J. Clark 2026-03-10 318
d69ccfcbc95519 Derek J. Clark 2026-03-10 319 reinit_completion(&drvdata.send_cmd_complete);
d69ccfcbc95519 Derek J. Clark 2026-03-10 320 return 0;
d69ccfcbc95519 Derek J. Clark 2026-03-10 321 }
d69ccfcbc95519 Derek J. Clark 2026-03-10 322
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 13:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 13:09 drivers/hid/hid-lenovo-go.c:295:18: sparse: warning: Initializer entry defined twice kernel test robot
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.