All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe-block:rw_iter 73/100] drivers/misc/lis3lv02d/lis3lv02d.c:604:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations
@ 2024-04-06  5:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-06  5:44 UTC (permalink / raw)
  To: Jens Axboe; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git rw_iter
head:   bb4803260393a54d3b254c2abfe121ab89cce776
commit: 3da0a9ea5378904e1a669a4b7e7130204b5bce95 [73/100] misc: lis3lv02d: convert to iterators
config: i386-buildonly-randconfig-004-20240406 (https://download.01.org/0day-ci/archive/20240406/202404061340.6zU6DYml-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240406/202404061340.6zU6DYml-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404061340.6zU6DYml-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/misc/lis3lv02d/lis3lv02d.c:604:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     604 |         size_t count = iov_iter_count(to);
         |                        ^
>> drivers/misc/lis3lv02d/lis3lv02d.c:641:7: error: call to undeclared function 'copy_to_iter_full'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     641 |         if (!copy_to_iter_full(&byte_data, sizeof(byte_data), to))
         |              ^
   2 errors generated.


vim +/iov_iter_count +604 drivers/misc/lis3lv02d/lis3lv02d.c

   598	
   599	static ssize_t lis3lv02d_misc_read(struct kiocb *iocb, struct iov_iter *to)
   600	{
   601		struct lis3lv02d *lis3 = container_of(iocb->ki_filp->private_data,
   602						      struct lis3lv02d, miscdev);
   603	
 > 604		size_t count = iov_iter_count(to);
   605		DECLARE_WAITQUEUE(wait, current);
   606		u32 data;
   607		unsigned char byte_data;
   608		ssize_t retval = 1;
   609	
   610		if (count < 1)
   611			return -EINVAL;
   612	
   613		add_wait_queue(&lis3->misc_wait, &wait);
   614		while (true) {
   615			set_current_state(TASK_INTERRUPTIBLE);
   616			data = atomic_xchg(&lis3->count, 0);
   617			if (data)
   618				break;
   619	
   620			if (iocb->ki_filp->f_flags & O_NONBLOCK) {
   621				retval = -EAGAIN;
   622				goto out;
   623			}
   624	
   625			if (signal_pending(current)) {
   626				retval = -ERESTARTSYS;
   627				goto out;
   628			}
   629	
   630			schedule();
   631		}
   632	
   633		if (data < 255)
   634			byte_data = data;
   635		else
   636			byte_data = 255;
   637	
   638		/* make sure we are not going into copy_to_user() with
   639		 * TASK_INTERRUPTIBLE state */
   640		set_current_state(TASK_RUNNING);
 > 641		if (!copy_to_iter_full(&byte_data, sizeof(byte_data), to))
   642			retval = -EFAULT;
   643	
   644	out:
   645		__set_current_state(TASK_RUNNING);
   646		remove_wait_queue(&lis3->misc_wait, &wait);
   647	
   648		return retval;
   649	}
   650	

-- 
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:[~2024-04-06  5:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06  5:44 [axboe-block:rw_iter 73/100] drivers/misc/lis3lv02d/lis3lv02d.c:604:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations 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.