All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Jiri Kosina <jikos@kernel.org>,
	Mark Pearson <mpearson-lenovo@squebb.ca>
Subject: drivers/hid/hid-lenovo-go.c:295:18: sparse: sparse: Initializer entry defined twice
Date: Thu, 03 Dec 2026 09:46:08 +0100	[thread overview]
Message-ID: <20261203094116.08YPBFog-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-12-03  8:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261203094116.08YPBFog-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=derekjohn.clark@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.