llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [axboe-block:rw_iter 130/133] drivers/remoteproc/remoteproc_debugfs.c:73:17: error: implicit declaration of function 'iov_iter_count' is invalid in C99
@ 2024-04-06 22:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-06 22:45 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:   1a95bcd36c1c2fd1c92f33b5ea95c2e0a5667100
commit: 14b8211dc0e4d288a7ee2471979269d33e83f29f [130/133] drivers/remoteproc: convert to read/write iterators
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240407/202404070655.26s12eRv-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240407/202404070655.26s12eRv-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/202404070655.26s12eRv-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/remoteproc/remoteproc_debugfs.c:73:17: error: implicit declaration of function 'iov_iter_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           size_t count = iov_iter_count(from);
                          ^
>> drivers/remoteproc/remoteproc_debugfs.c:80:9: error: implicit declaration of function 'copy_from_iter_full' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           ret = !copy_from_iter_full(buf, count, from);
                  ^
   drivers/remoteproc/remoteproc_debugfs.c:80:9: note: did you mean 'copy_from_user_nofault'?
   include/linux/uaccess.h:377:6: note: 'copy_from_user_nofault' declared here
   long copy_from_user_nofault(void *dst, const void __user *src, size_t size);
        ^
   drivers/remoteproc/remoteproc_debugfs.c:207:17: error: implicit declaration of function 'iov_iter_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           size_t count = iov_iter_count(from);
                          ^
   drivers/remoteproc/remoteproc_debugfs.c:214:9: error: implicit declaration of function 'copy_from_iter_full' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           ret = !copy_from_iter_full(buf, count, from);
                  ^
   4 errors generated.


vim +/iov_iter_count +73 drivers/remoteproc/remoteproc_debugfs.c

    53	
    54	/*
    55	 * By writing to the 'coredump' debugfs entry, we control the behavior of the
    56	 * coredump mechanism dynamically. The default value of this entry is "disabled".
    57	 *
    58	 * The 'coredump' debugfs entry supports these commands:
    59	 *
    60	 * disabled:	By default coredump collection is disabled. Recovery will
    61	 *		proceed without collecting any dump.
    62	 *
    63	 * enabled:	When the remoteproc crashes the entire coredump will be copied
    64	 *		to a separate buffer and exposed to userspace.
    65	 *
    66	 * inline:	The coredump will not be copied to a separate buffer and the
    67	 *		recovery process will have to wait until data is read by
    68	 *		userspace. But this avoid usage of extra memory.
    69	 */
    70	static ssize_t rproc_coredump_write(struct kiocb *iocb, struct iov_iter *from)
    71	{
    72		struct rproc *rproc = iocb->ki_filp->private_data;
  > 73		size_t count = iov_iter_count(from);
    74		int ret, err = 0;
    75		char buf[20];
    76	
    77		if (count < 1 || count > sizeof(buf))
    78			return -EINVAL;
    79	
  > 80		ret = !copy_from_iter_full(buf, count, from);
    81		if (ret)
    82			return -EFAULT;
    83	
    84		/* remove end of line */
    85		if (buf[count - 1] == '\n')
    86			buf[count - 1] = '\0';
    87	
    88		if (rproc->state == RPROC_CRASHED) {
    89			dev_err(&rproc->dev, "can't change coredump configuration\n");
    90			err = -EBUSY;
    91			goto out;
    92		}
    93	
    94		if (!strncmp(buf, "disabled", count)) {
    95			rproc->dump_conf = RPROC_COREDUMP_DISABLED;
    96		} else if (!strncmp(buf, "enabled", count)) {
    97			rproc->dump_conf = RPROC_COREDUMP_ENABLED;
    98		} else if (!strncmp(buf, "inline", count)) {
    99			rproc->dump_conf = RPROC_COREDUMP_INLINE;
   100		} else {
   101			dev_err(&rproc->dev, "Invalid coredump configuration\n");
   102			err = -EINVAL;
   103		}
   104	out:
   105		return err ? err : count;
   106	}
   107	

-- 
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 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 22:45 [axboe-block:rw_iter 130/133] drivers/remoteproc/remoteproc_debugfs.c:73:17: error: implicit declaration of function 'iov_iter_count' is invalid in C99 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).