All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/hid/hid-lenovo-go.c:295:18: sparse: sparse: Initializer entry defined twice
@ 2026-12-03  8:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-03  8:46 UTC (permalink / raw)
  To: Derek J. Clark; +Cc: oe-kbuild-all, linux-kernel, Jiri Kosina, Mark Pearson

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
commit: d69ccfcbc9551988190895bc125a8bf709aa5931 HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver
date:   9 months ago
config: parisc-randconfig-r2301-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203094116.08YPBFog-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.5.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203094116.08YPBFog-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/oe-kbuild-all/20261203094116.08YPBFog-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/hid/hid-lenovo-go.c:295:18: sparse: sparse: Initializer entry defined twice
   drivers/hid/hid-lenovo-go.c:295:18: sparse:   also defined here

vim +295 drivers/hid/hid-lenovo-go.c

   280	
   281	static int mcu_property_out(struct hid_device *hdev, u8 id, u8 command,
   282				    u8 index, enum dev_type device, u8 *data, size_t len)
   283	{
   284		unsigned char *dmabuf __free(kfree) = NULL;
   285		u8 header[] = { GO_OUTPUT_REPORT_ID, id, command, index, device };
   286		size_t header_size = ARRAY_SIZE(header);
   287		int timeout = 50;
   288		int ret;
   289	
   290		if (header_size + len > GO_PACKET_SIZE)
   291			return -EINVAL;
   292	
   293		guard(mutex)(&drvdata.cfg_mutex);
   294		/* We can't use a devm_alloc reusable buffer without side effects during suspend */
 > 295		dmabuf = kzalloc(GO_PACKET_SIZE, GFP_KERNEL);
   296		if (!dmabuf)
   297			return -ENOMEM;
   298	
   299		memcpy(dmabuf, header, header_size);
   300		memcpy(dmabuf + header_size, data, len);
   301	
   302		dev_dbg(&hdev->dev, "Send data as raw output report: [%*ph]\n",
   303			GO_PACKET_SIZE, dmabuf);
   304	
   305		ret = hid_hw_output_report(hdev, dmabuf, GO_PACKET_SIZE);
   306		if (ret < 0)
   307			return ret;
   308	
   309		ret = ret == GO_PACKET_SIZE ? 0 : -EINVAL;
   310		if (ret)
   311			return ret;
   312	
   313		ret = wait_for_completion_interruptible_timeout(&drvdata.send_cmd_complete,
   314								msecs_to_jiffies(timeout));
   315	
   316		if (ret == 0) /* timeout occurred */
   317			ret = -EBUSY;
   318	
   319		reinit_completion(&drvdata.send_cmd_complete);
   320		return 0;
   321	}
   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-03  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  8:46 drivers/hid/hid-lenovo-go.c:295:18: sparse: sparse: 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.