From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [axboe-block:rw_iter 8/105] drivers/char/apm-emulation.c:207:24: error: implicit declaration of function 'iov_iter_count'
Date: Sat, 6 Apr 2024 22:58:28 +0800 [thread overview]
Message-ID: <202404062219.pb096Kaf-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git rw_iter
head: 941c541566a6784beff5ef54ed880c606e3a6225
commit: c2c25f7dd4b3215699ae7d42d9c48bb73b0e62a2 [8/105] char: convert drivers to use ->read_iter() and ->write_iter()
config: arm-randconfig-r123-20240406 (https://download.01.org/0day-ci/archive/20240406/202404062219.pb096Kaf-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240406/202404062219.pb096Kaf-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/202404062219.pb096Kaf-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/char/apm-emulation.c: In function 'apm_read':
>> drivers/char/apm-emulation.c:207:24: error: implicit declaration of function 'iov_iter_count' [-Werror=implicit-function-declaration]
207 | size_t count = iov_iter_count(to);
| ^~~~~~~~~~~~~~
>> drivers/char/apm-emulation.c:223:22: error: implicit declaration of function 'copy_to_iter_full' [-Werror=implicit-function-declaration]
223 | if (!copy_to_iter_full(&event, sizeof(event), to))
| ^~~~~~~~~~~~~~~~~
drivers/char/apm-emulation.c: At top level:
drivers/char/apm-emulation.c:144:19: warning: 'driver_version' defined but not used [-Wunused-const-variable=]
144 | static const char driver_version[] = "1.13"; /* no spaces */
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iov_iter_count +207 drivers/char/apm-emulation.c
202
203 static ssize_t apm_read(struct kiocb *iocb, struct iov_iter *to)
204 {
205 struct file *fp = iocb->ki_filp;
206 struct apm_user *as = fp->private_data;
> 207 size_t count = iov_iter_count(to);
208 apm_event_t event;
209 int i = count, ret = 0;
210
211 if (count < sizeof(apm_event_t))
212 return -EINVAL;
213
214 if (queue_empty(&as->queue) && fp->f_flags & O_NONBLOCK)
215 return -EAGAIN;
216
217 wait_event_interruptible(apm_waitqueue, !queue_empty(&as->queue));
218
219 while ((i >= sizeof(event)) && !queue_empty(&as->queue)) {
220 event = queue_get_event(&as->queue);
221
222 ret = -EFAULT;
> 223 if (!copy_to_iter_full(&event, sizeof(event), to))
224 break;
225
226 mutex_lock(&state_lock);
227 if (as->suspend_state == SUSPEND_PENDING &&
228 (event == APM_SYS_SUSPEND || event == APM_USER_SUSPEND))
229 as->suspend_state = SUSPEND_READ;
230 mutex_unlock(&state_lock);
231
232 i -= sizeof(event);
233 }
234
235 if (i < count)
236 ret = count - i;
237
238 return ret;
239 }
240
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-04-06 14:58 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=202404062219.pb096Kaf-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--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.