* [axboe-block:rw_iter 8/105] drivers/char/apm-emulation.c:207:24: error: implicit declaration of function 'iov_iter_count'
@ 2024-04-06 14:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-06 14:58 UTC (permalink / raw)
To: Jens Axboe; +Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-06 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 14:58 [axboe-block:rw_iter 8/105] drivers/char/apm-emulation.c:207:24: error: implicit declaration of function 'iov_iter_count' 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.