lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511190932.OFk1oMBB-lkp@intel.com>
Date: Wed, 19 Nov 2025 09:47:11 +0800
From: kernel test robot <lkp@...el.com>
To: 2724853925@...com, Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Henrik Rydberg <rydberg@...math.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
	2724853925@...com
Subject: Re: [PATCH] input: touchscreen: Add ilitek touchscreen driver support

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on dtor-input/next]
[also build test WARNING on dtor-input/for-linus linus/master v6.18-rc6 next-20251118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/2724853925-qq-com/input-touchscreen-Add-ilitek-touchscreen-driver-support/20251116-215220
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link:    https://lore.kernel.org/r/tencent_995E6FC62EDBC1EED14E6052847F270F6406%40qq.com
patch subject: [PATCH] input: touchscreen: Add ilitek touchscreen driver support
config: sh-randconfig-r112-20251119 (https://download.01.org/0day-ci/archive/20251119/202511190932.OFk1oMBB-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511190932.OFk1oMBB-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
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511190932.OFk1oMBB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/input/touchscreen/ilitek/ilitek_tool.c:93:38: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got char const *buf @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:93:38: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:93:38: sparse:     got char const *buf
   drivers/input/touchscreen/ilitek/ilitek_tool.c:239:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:239:45: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:239:45: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:268:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:268:35: sparse:     expected void [noderef] __user *to
   drivers/input/touchscreen/ilitek/ilitek_tool.c:268:35: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:279:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:279:35: sparse:     expected void [noderef] __user *to
   drivers/input/touchscreen/ilitek/ilitek_tool.c:279:35: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:286:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:286:35: sparse:     expected void [noderef] __user *to
   drivers/input/touchscreen/ilitek/ilitek_tool.c:286:35: sparse:     got unsigned char [usertype] *
>> drivers/input/touchscreen/ilitek/ilitek_tool.c:307:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected signed int [noderef] __user *__pu_addr @@     got signed int [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:307:21: sparse:     expected signed int [noderef] __user *__pu_addr
   drivers/input/touchscreen/ilitek/ilitek_tool.c:307:21: sparse:     got signed int [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:312:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:312:45: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:312:45: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:324:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:324:45: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:324:45: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:340:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:340:45: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:340:45: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:365:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got unsigned char [usertype] * @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:365:35: sparse:     expected void [noderef] __user *to
   drivers/input/touchscreen/ilitek/ilitek_tool.c:365:35: sparse:     got unsigned char [usertype] *
   drivers/input/touchscreen/ilitek/ilitek_tool.c:416:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got char *buf @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:416:26: sparse:     expected void [noderef] __user *to
   drivers/input/touchscreen/ilitek/ilitek_tool.c:416:26: sparse:     got char *buf
   drivers/input/touchscreen/ilitek/ilitek_tool.c:444:17: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *read )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:444:17: sparse:     expected int ( *read )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:444:17: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:445:18: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *write )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:445:18: sparse:     expected int ( *write )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:445:18: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:457:22: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *proc_read )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:457:22: sparse:     expected int ( *proc_read )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:457:22: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:458:23: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *proc_write )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:458:23: sparse:     expected int ( *proc_write )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:458:23: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:571:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got char const *buf @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:571:37: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:571:37: sparse:     got char const *buf
   drivers/input/touchscreen/ilitek/ilitek_tool.c:610:23: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *proc_write )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:610:23: sparse:     expected int ( *proc_write )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:610:23: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:622:33: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got char const *buf @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:622:33: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:622:33: sparse:     got char const *buf
   drivers/input/touchscreen/ilitek/ilitek_tool.c:684:23: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *proc_write )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:684:23: sparse:     expected int ( *proc_write )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:684:23: sparse:     got int ( * )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:693:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got char const *buf @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:693:36: sparse:     expected void const [noderef] __user *from
   drivers/input/touchscreen/ilitek/ilitek_tool.c:693:36: sparse:     got char const *buf
   drivers/input/touchscreen/ilitek/ilitek_tool.c:731:23: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@     expected int ( *proc_write )( ... ) @@     got int ( * )( ... ) @@
   drivers/input/touchscreen/ilitek/ilitek_tool.c:731:23: sparse:     expected int ( *proc_write )( ... )
   drivers/input/touchscreen/ilitek/ilitek_tool.c:731:23: sparse:     got int ( * )( ... )

vim +307 drivers/input/touchscreen/ilitek/ilitek_tool.c

   218	
   219	static FOPS_IOCTL_FUNC(ilitek_file_ioctl, uint32_t cmd, unsigned long arg)
   220	{
   221		static u8 *buffer;
   222		static unsigned long len;
   223		s32 ret = 0;
   224		int tmp;
   225	
   226		buffer = kmalloc(ILITEK_IOCTL_MAX_TRANSFER, GFP_KERNEL);
   227		memset(buffer, 0, ILITEK_IOCTL_MAX_TRANSFER);
   228	
   229		switch (cmd) {
   230		case ILITEK_IOCTL_I2C_WRITE_DATA:
   231		case ILITEK_IOCTL_I2C_WRITE_DATA_COMPAT:
   232			if (len > ILITEK_IOCTL_MAX_TRANSFER) {
   233				TP_ERR(NULL, "invalid write len: %lu > %lu too large\n",
   234					len, ILITEK_IOCTL_MAX_TRANSFER);
   235				ret = -EINVAL;
   236				break;
   237			}
   238	
   239			if (copy_from_user(buffer, (u8 *)arg, len)) {
   240				TP_ERR(NULL, "copy data from user space, failed\n");
   241				ret = -EFAULT;
   242				break;
   243			}
   244	
   245			mutex_lock(&ts->ilitek_mutex);
   246			ret = ilitek_write_and_read(buffer, len, 0, NULL, 0);
   247			mutex_unlock(&ts->ilitek_mutex);
   248			if (ret < 0)
   249				TP_ERR(NULL, "i2c write failed, cmd: %x\n", buffer[0]);
   250			break;
   251		case ILITEK_IOCTL_I2C_READ_DATA:
   252		case ILITEK_IOCTL_I2C_READ_DATA_COMPAT:
   253			if (len > ILITEK_IOCTL_MAX_TRANSFER) {
   254				TP_ERR(NULL, "invalid read len: %lu > %lu too large\n",
   255					len, ILITEK_IOCTL_MAX_TRANSFER);
   256				ret = -EINVAL;
   257				break;
   258			}
   259	
   260			mutex_lock(&ts->ilitek_mutex);
   261			ret = ilitek_write_and_read(NULL, 0, 0, buffer, len);
   262			mutex_unlock(&ts->ilitek_mutex);
   263			if (ret < 0) {
   264				TP_ERR(NULL, "i2c read failed, buf: %x\n", buffer[0]);
   265				break;
   266			}
   267	
   268			if (copy_to_user((u8 *)arg, buffer, len)) {
   269				ret = -EFAULT;
   270				TP_ERR(NULL, "copy data to user space, failed\n");
   271			}
   272			break;
   273		case ILITEK_IOCTL_I2C_WRITE_LENGTH:
   274		case ILITEK_IOCTL_I2C_READ_LENGTH:
   275			len = arg;
   276			break;
   277		case ILITEK_IOCTL_DRIVER_INFORMATION:
   278			memcpy(buffer, driver_ver, 7);
   279			if (copy_to_user((u8 *)arg, buffer, 7))
   280				ret = -EFAULT;
   281			break;
   282		case ILITEK_IOCTL_I2C_UPDATE:
   283			break;
   284		case ILITEK_IOCTL_I2C_INT_FLAG:
   285			buffer[0] = !(gpio_get_value(ts->irq_gpio));
   286			if (copy_to_user((u8 *)arg, buffer, 1)) {
   287				TP_ERR(NULL, "copy data to user space, failed\n");
   288				ret = -EFAULT;
   289				break;
   290			}
   291			TP_DBG(NULL, "ILITEK_IOCTL_I2C_INT_FLAG = %d.\n", buffer[0]);
   292			break;
   293		case ILITEK_IOCTL_START_READ_DATA:
   294			ilitek_irq_enable();
   295			ts->unhandle_irq = false;
   296			TP_MSG(NULL, "enable_irq and ts->unhandle_irq = false.\n");
   297			break;
   298		case ILITEK_IOCTL_STOP_READ_DATA:
   299			ilitek_irq_disable();
   300			ts->unhandle_irq = true;
   301			TP_MSG(NULL, "disable_irq and ts->unhandle_irq = true.\n");
   302			break;
   303		case ILITEK_IOCTL_RESET:
   304			ilitek_reset(ts->dev->reset_time);
   305			break;
   306		case ILITEK_IOCTL_INT_STATUS:
 > 307			if (put_user(gpio_get_value(ts->irq_gpio), (s32 *)arg))
   308				ret = -EFAULT;
   309			break;
   310	#ifdef ILITEK_TUNING_MESSAGE
   311		case ILITEK_IOCTL_DEBUG_SWITCH:
   312			if (copy_from_user(buffer, (u8 *)arg, 1)) {
   313				ret = -EFAULT;
   314				break;
   315			}
   316			TP_MSG(NULL, "ilitek The debug_flag = %d.\n", buffer[0]);
   317			if (buffer[0] == 0)
   318				ilitek_debug_flag = false;
   319			else if (buffer[0] == 1)
   320				ilitek_debug_flag = true;
   321			break;
   322	#endif
   323		case ILITEK_IOCTL_I2C_SWITCH_IRQ:
   324			if (copy_from_user(buffer, (u8 *)arg, 1)) {
   325				ret = -EFAULT;
   326				break;
   327			}
   328	
   329			if (buffer[0] == 0)
   330				ilitek_irq_disable();
   331			else
   332				ilitek_irq_enable();
   333	
   334			break;
   335		case ILITEK_IOCTL_UPDATE_FLAG:
   336			ts->operation_protection = arg;
   337			TP_MSG(NULL, "operation_protection = %d\n", ts->operation_protection);
   338			break;
   339		case ILITEK_IOCTL_I2C_UPDATE_FW:
   340			if (copy_from_user(buffer, (u8 *)arg, 35)) {
   341				TP_ERR(NULL, "copy data from user space, failed\n");
   342				ret = -EFAULT;
   343				break;
   344			}
   345	
   346			ilitek_irq_disable();
   347			mutex_lock(&ts->ilitek_mutex);
   348			ret = ilitek_write_and_read(buffer, buffer[34], 0, NULL, 0);
   349			mutex_unlock(&ts->ilitek_mutex);
   350			ilitek_irq_enable();
   351	
   352			if (ret < 0)
   353				TP_ERR(NULL, "i2c write, failed\n");
   354	
   355			break;
   356		case ILITEK_IOCTL_I2C_INT_CLR:
   357			TP_DBG(NULL, "ILITEK_IOCTL_I2C_INT_CLR, set get_INT false\n");
   358			atomic_set(&ts->get_INT, 0);
   359			break;
   360		case ILITEK_IOCTL_I2C_INT_POLL:
   361		case ILITEK_IOCTL_I2C_INT_POLL_COMPAT:
   362			tmp = atomic_read(&ts->get_INT);
   363			TP_DBG(NULL, "ILITEK_IOCTL_I2C_INT_POLL, get_INT: %d\n", tmp);
   364	
   365			if (copy_to_user((u8 *)arg, &tmp, 1)) {
   366				TP_ERR(NULL, "copy data to user space, failed\n");
   367				ret = -EFAULT;
   368			}
   369			break;
   370		case ILITEK_IOCTL_I2C_ISR_TYPE:
   371			TP_MSG(NULL, "ILITEK_IOCTL_I2C_ISR_TYPE, set ISR type: %lu\n", arg);
   372			ts->irq_handle_type = (arg >> 16);
   373			ts->irq_read_len = arg & 0xFFFF;
   374			break;
   375		case ILITEK_IOCTL_I2C_NETLINK:
   376			TP_MSG(NULL, "ILITEK_IOCTL_I2C_NETLINK, set netlink: %s with ETH: %hhu\n",
   377				(arg >> 8) ? "ON" : "OFF", (u8)(arg & 0xFF));
   378	
   379			if (arg >> 8)
   380				ret = ilitek_netlink_init(arg & 0xFF);
   381			else
   382				ilitek_netlink_exit();
   383	
   384			break;
   385		default:
   386			TP_ERR(NULL, "unrecognized ioctl cmd: 0x%04x\n", cmd);
   387			ret = -EINVAL;
   388			break;
   389		}
   390	
   391		kfree(buffer);
   392		return (ret < 0) ? ret : 0;
   393	}
   394	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ