* [axboe-block:rw_iter 43/100] drivers/input/touchscreen/edt-ft5x06.c:744:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations
@ 2024-04-06 4:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-06 4:51 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: 96f24e13a506765e099dc3c9c4f00f986cb0a229
commit: 0b307b873afea9af972f21c38b0d8a4cb5f11451 [43/100] drivers/input: convert to read/write iterators
config: i386-buildonly-randconfig-004-20240406 (https://download.01.org/0day-ci/archive/20240406/202404061251.lZz8vXgj-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/202404061251.lZz8vXgj-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/202404061251.lZz8vXgj-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/input/touchscreen/edt-ft5x06.c:744:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
744 | size_t count = iov_iter_count(to);
| ^
>> drivers/input/touchscreen/edt-ft5x06.c:802:7: error: call to undeclared function 'copy_to_iter_full'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
802 | if (!copy_to_iter_full(tsdata->raw_buffer + iocb->ki_pos, read, to)) {
| ^
2 errors generated.
vim +/iov_iter_count +744 drivers/input/touchscreen/edt-ft5x06.c
734
735 DEFINE_SIMPLE_ATTRIBUTE(debugfs_mode_fops, edt_ft5x06_debugfs_mode_get,
736 edt_ft5x06_debugfs_mode_set, "%llu\n");
737
738 static ssize_t edt_ft5x06_debugfs_raw_data_read(struct kiocb *iocb,
739 struct iov_iter *to)
740 {
741 struct edt_ft5x06_ts_data *tsdata = iocb->ki_filp->private_data;
742 struct i2c_client *client = tsdata->client;
743 int retries = EDT_RAW_DATA_RETRIES;
> 744 size_t count = iov_iter_count(to);
745 unsigned int val;
746 int i, error;
747 size_t read = 0;
748 int colbytes;
749 u8 *rdbuf;
750
751 if (iocb->ki_pos < 0 || iocb->ki_pos >= tsdata->raw_bufsize)
752 return 0;
753
754 mutex_lock(&tsdata->mutex);
755
756 if (!tsdata->factory_mode || !tsdata->raw_buffer) {
757 error = -EIO;
758 goto out;
759 }
760
761 error = regmap_write(tsdata->regmap, 0x08, 0x01);
762 if (error) {
763 dev_err(&client->dev,
764 "failed to write 0x08 register, error %d\n", error);
765 goto out;
766 }
767
768 do {
769 usleep_range(EDT_RAW_DATA_DELAY, EDT_RAW_DATA_DELAY + 100);
770 error = regmap_read(tsdata->regmap, 0x08, &val);
771 if (error) {
772 dev_err(&client->dev,
773 "failed to read 0x08 register, error %d\n",
774 error);
775 goto out;
776 }
777
778 if (val == 1)
779 break;
780 } while (--retries > 0);
781
782 if (retries == 0) {
783 dev_err(&client->dev,
784 "timed out waiting for register to settle\n");
785 error = -ETIMEDOUT;
786 goto out;
787 }
788
789 rdbuf = tsdata->raw_buffer;
790 colbytes = tsdata->num_y * sizeof(u16);
791
792 for (i = 0; i < tsdata->num_x; i++) {
793 rdbuf[0] = i; /* column index */
794 error = regmap_bulk_read(tsdata->regmap, 0xf5, rdbuf, colbytes);
795 if (error)
796 goto out;
797
798 rdbuf += colbytes;
799 }
800
801 read = min_t(size_t, count, tsdata->raw_bufsize - iocb->ki_pos);
> 802 if (!copy_to_iter_full(tsdata->raw_buffer + iocb->ki_pos, read, to)) {
803 error = -EFAULT;
804 goto out;
805 }
806
807 iocb->ki_pos += read;
808 out:
809 mutex_unlock(&tsdata->mutex);
810 return error ?: read;
811 };
812
--
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 4:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 4:51 [axboe-block:rw_iter 43/100] drivers/input/touchscreen/edt-ft5x06.c:744:17: error: call to undeclared function 'iov_iter_count'; ISO C99 and later do not support implicit function declarations 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 read-only IMAP folder(s) and NNTP newsgroup(s).