All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Sat, 6 Apr 2024 13:44:09 +0800	[thread overview]
Message-ID: <202404061340.6zU6DYml-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-04-06  5:44 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=202404061340.6zU6DYml-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=llvm@lists.linux.dev \
    --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.