public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "José Expósito" <jose.exposito89@gmail.com>, jikos@kernel.org
Cc: kbuild-all@lists.01.org, benjamin.tissoires@redhat.com,
	spbnick@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, stefanberzl@gmail.com,
	"José Expósito" <jose.exposito89@gmail.com>
Subject: Re: [PATCH for-5.19/uclogic 3/4] HID: uclogic: Allow to generate frame templates
Date: Wed, 18 May 2022 07:30:38 +0800	[thread overview]
Message-ID: <202205180755.I9jze1Z4-lkp@intel.com> (raw)
In-Reply-To: <20220516181323.59554-4-jose.exposito89@gmail.com>

Hi "José,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on f7d8e387d9aeff963e6691c0166269b8042b4ff9]

url:    https://github.com/intel-lab-lkp/linux/commits/Jos-Exp-sito/Add-support-for-XP-PEN-Deco-L/20220517-021641
base:   f7d8e387d9aeff963e6691c0166269b8042b4ff9
config: mips-randconfig-s032-20220516 (https://download.01.org/0day-ci/archive/20220518/202205180755.I9jze1Z4-lkp@intel.com/config)
compiler: mipsel-linux-gcc (GCC) 11.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.4-dirty
        # https://github.com/intel-lab-lkp/linux/commit/d296b420a45eab3527916c73203ed045b65af58e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jos-Exp-sito/Add-support-for-XP-PEN-Deco-L/20220517-021641
        git checkout d296b420a45eab3527916c73203ed045b65af58e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash drivers/hid/

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 >>)
   command-line: note: in included file:
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
   builtin:0:0: sparse: this was the original definition
   drivers/hid/hid-uclogic-rdesc.c:1014:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected signed int x @@     got restricted __le32 [usertype] @@
   drivers/hid/hid-uclogic-rdesc.c:1014:25: sparse:     expected signed int x
   drivers/hid/hid-uclogic-rdesc.c:1014:25: sparse:     got restricted __le32 [usertype]
>> drivers/hid/hid-uclogic-rdesc.c:1020:44: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] @@
   drivers/hid/hid-uclogic-rdesc.c:1020:44: sparse:     expected unsigned short [usertype] val
   drivers/hid/hid-uclogic-rdesc.c:1020:44: sparse:     got restricted __le16 [usertype]

vim +1020 drivers/hid/hid-uclogic-rdesc.c

   974	
   975	const size_t uclogic_rdesc_xppen_deco01_frame_size =
   976				sizeof(uclogic_rdesc_xppen_deco01_frame_arr);
   977	
   978	/**
   979	 * uclogic_rdesc_template_apply() - apply report descriptor parameters to a
   980	 * report descriptor template, creating a report descriptor. Copies the
   981	 * template over to the new report descriptor and replaces every occurrence of
   982	 * the template placeholders, followed by an index byte, with the value from the
   983	 * parameter list at that index.
   984	 *
   985	 * @template_ptr:	Pointer to the template buffer.
   986	 * @template_size:	Size of the template buffer.
   987	 * @param_list:		List of template parameters.
   988	 * @param_num:		Number of parameters in the list.
   989	 *
   990	 * Returns:
   991	 *	Kmalloc-allocated pointer to the created report descriptor,
   992	 *	or NULL if allocation failed.
   993	 */
   994	__u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr,
   995					   size_t template_size,
   996					   const s32 *param_list,
   997					   size_t param_num)
   998	{
   999		static const __u8 btn_head[] = {UCLOGIC_RDESC_FRAME_PH_BTN_HEAD};
  1000		static const __u8 pen_head[] = {UCLOGIC_RDESC_PEN_PH_HEAD};
  1001		__u8 *rdesc_ptr;
  1002		__u8 *p;
  1003		s32 v;
  1004	
  1005		rdesc_ptr = kmemdup(template_ptr, template_size, GFP_KERNEL);
  1006		if (rdesc_ptr == NULL)
  1007			return NULL;
  1008	
  1009		for (p = rdesc_ptr; p + sizeof(btn_head) < rdesc_ptr + template_size;) {
  1010			if (p + sizeof(pen_head) < rdesc_ptr + template_size &&
  1011			    memcmp(p, pen_head, sizeof(pen_head)) == 0 &&
  1012			    p[sizeof(pen_head)] < param_num) {
  1013				v = param_list[p[sizeof(pen_head)]];
  1014				put_unaligned(cpu_to_le32(v), (s32 *)p);
  1015				p += sizeof(pen_head) + 1;
  1016			} else if (memcmp(p, btn_head, sizeof(btn_head)) == 0 &&
  1017				   p[sizeof(btn_head)] < param_num) {
  1018				v = param_list[p[sizeof(btn_head)]];
  1019				put_unaligned((__u8)0x2A, p); /* Usage Maximum */
> 1020				put_unaligned_le16(cpu_to_le16(v), p + 1);

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-05-17 23:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 18:13 [PATCH for-5.19/uclogic 0/4] Add support for XP-PEN Deco L José Expósito
2022-05-16 18:13 ` [PATCH for-5.19/uclogic 1/4] HID: uclogic: Make template placeholder IDs generic José Expósito
2022-05-16 18:13 ` [PATCH for-5.19/uclogic 2/4] HID: uclogic: Add KUnit tests for uclogic_rdesc_template_apply() José Expósito
2022-05-17  7:16   ` kernel test robot
2022-05-16 18:13 ` [PATCH for-5.19/uclogic 3/4] HID: uclogic: Allow to generate frame templates José Expósito
2022-05-17 23:30   ` kernel test robot [this message]
2022-05-16 18:13 ` [PATCH for-5.19/uclogic 4/4] HID: uclogic: Add support for XP-PEN Deco L José Expósito
2022-05-17  4:12   ` kernel test robot
2022-05-17 22:50   ` 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=202205180755.I9jze1Z4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jose.exposito89@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spbnick@gmail.com \
    --cc=stefanberzl@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox