* [axboe-block:rw_iter 427/438] drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Function parameter or struct member 'iocb' not described in 'zynqmp_pm_debugfs_api_write'
@ 2024-04-13 12:45 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-13 12: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: 320301899c4ff72871d71dd55bebea97f4a3a63e
commit: 364564d3dba6ce3f6aca6b7702c55df53a27ec5b [427/438] firmware: xilinx: convert to read/write iterators
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20240413/202404132052.QTmdhOwq-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240413/202404132052.QTmdhOwq-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/202404132052.QTmdhOwq-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Function parameter or struct member 'iocb' not described in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Function parameter or struct member 'from' not described in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Excess function parameter 'file' description in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Excess function parameter 'ptr' description in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Excess function parameter 'len' description in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Excess function parameter 'off' description in 'zynqmp_pm_debugfs_api_write'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Function parameter or struct member 'iocb' not described in 'zynqmp_pm_debugfs_api_read'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Function parameter or struct member 'to' not described in 'zynqmp_pm_debugfs_api_read'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Excess function parameter 'file' description in 'zynqmp_pm_debugfs_api_read'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Excess function parameter 'ptr' description in 'zynqmp_pm_debugfs_api_read'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Excess function parameter 'len' description in 'zynqmp_pm_debugfs_api_read'
>> drivers/firmware/xilinx/zynqmp-debug.c:206: warning: Excess function parameter 'off' description in 'zynqmp_pm_debugfs_api_read'
vim +148 drivers/firmware/xilinx/zynqmp-debug.c
b321725257c173 Rajan Vaja 2018-09-12 131
b321725257c173 Rajan Vaja 2018-09-12 132 /**
b321725257c173 Rajan Vaja 2018-09-12 133 * zynqmp_pm_debugfs_api_write() - debugfs write function
b321725257c173 Rajan Vaja 2018-09-12 134 * @file: User file
b321725257c173 Rajan Vaja 2018-09-12 135 * @ptr: User entered PM-API string
b321725257c173 Rajan Vaja 2018-09-12 136 * @len: Length of the userspace buffer
b321725257c173 Rajan Vaja 2018-09-12 137 * @off: Offset within the file
b321725257c173 Rajan Vaja 2018-09-12 138 *
b321725257c173 Rajan Vaja 2018-09-12 139 * Used for triggering pm api functions by writing
b321725257c173 Rajan Vaja 2018-09-12 140 * echo <pm_api_id> > /sys/kernel/debug/zynqmp_pm/power or
b321725257c173 Rajan Vaja 2018-09-12 141 * echo <pm_api_name> > /sys/kernel/debug/zynqmp_pm/power
b321725257c173 Rajan Vaja 2018-09-12 142 *
b321725257c173 Rajan Vaja 2018-09-12 143 * Return: Number of bytes copied if PM-API request succeeds,
b321725257c173 Rajan Vaja 2018-09-12 144 * the corresponding error code otherwise
b321725257c173 Rajan Vaja 2018-09-12 145 */
364564d3dba6ce Jens Axboe 2024-04-09 146 static ssize_t zynqmp_pm_debugfs_api_write(struct kiocb *iocb,
364564d3dba6ce Jens Axboe 2024-04-09 147 struct iov_iter *from)
b321725257c173 Rajan Vaja 2018-09-12 @148 {
b321725257c173 Rajan Vaja 2018-09-12 149 char *kern_buff, *tmp_buff;
b321725257c173 Rajan Vaja 2018-09-12 150 char *pm_api_req;
b321725257c173 Rajan Vaja 2018-09-12 151 u32 pm_id = 0;
b321725257c173 Rajan Vaja 2018-09-12 152 u64 pm_api_arg[4] = {0, 0, 0, 0};
b321725257c173 Rajan Vaja 2018-09-12 153 /* Return values from PM APIs calls */
b321725257c173 Rajan Vaja 2018-09-12 154 u32 pm_api_ret[4] = {0, 0, 0, 0};
364564d3dba6ce Jens Axboe 2024-04-09 155 size_t len = iov_iter_count(from);
b321725257c173 Rajan Vaja 2018-09-12 156
b321725257c173 Rajan Vaja 2018-09-12 157 int ret;
b321725257c173 Rajan Vaja 2018-09-12 158 int i = 0;
b321725257c173 Rajan Vaja 2018-09-12 159
b321725257c173 Rajan Vaja 2018-09-12 160 strcpy(debugfs_buf, "");
b321725257c173 Rajan Vaja 2018-09-12 161
364564d3dba6ce Jens Axboe 2024-04-09 162 if (iocb->ki_pos != 0 || len <= 1 || len > PAGE_SIZE - 1)
b321725257c173 Rajan Vaja 2018-09-12 163 return -EINVAL;
b321725257c173 Rajan Vaja 2018-09-12 164
364564d3dba6ce Jens Axboe 2024-04-09 165 kern_buff = iterdup(from, len);
b9472f7d822446 Jann Horn 2019-02-18 166 if (IS_ERR(kern_buff))
b9472f7d822446 Jann Horn 2019-02-18 167 return PTR_ERR(kern_buff);
b321725257c173 Rajan Vaja 2018-09-12 168 tmp_buff = kern_buff;
b321725257c173 Rajan Vaja 2018-09-12 169
b321725257c173 Rajan Vaja 2018-09-12 170 /* Read the API name from a user request */
b321725257c173 Rajan Vaja 2018-09-12 171 pm_api_req = strsep(&kern_buff, " ");
b321725257c173 Rajan Vaja 2018-09-12 172
b321725257c173 Rajan Vaja 2018-09-12 173 ret = get_pm_api_id(pm_api_req, &pm_id);
b321725257c173 Rajan Vaja 2018-09-12 174 if (ret < 0)
b321725257c173 Rajan Vaja 2018-09-12 175 goto err;
b321725257c173 Rajan Vaja 2018-09-12 176
b321725257c173 Rajan Vaja 2018-09-12 177 /* Read node_id and arguments from the PM-API request */
b321725257c173 Rajan Vaja 2018-09-12 178 pm_api_req = strsep(&kern_buff, " ");
b321725257c173 Rajan Vaja 2018-09-12 179 while ((i < ARRAY_SIZE(pm_api_arg)) && pm_api_req) {
b321725257c173 Rajan Vaja 2018-09-12 180 pm_api_arg[i++] = zynqmp_pm_argument_value(pm_api_req);
b321725257c173 Rajan Vaja 2018-09-12 181 pm_api_req = strsep(&kern_buff, " ");
b321725257c173 Rajan Vaja 2018-09-12 182 }
b321725257c173 Rajan Vaja 2018-09-12 183
b321725257c173 Rajan Vaja 2018-09-12 184 ret = process_api_request(pm_id, pm_api_arg, pm_api_ret);
b321725257c173 Rajan Vaja 2018-09-12 185
b321725257c173 Rajan Vaja 2018-09-12 186 err:
b321725257c173 Rajan Vaja 2018-09-12 187 kfree(tmp_buff);
b321725257c173 Rajan Vaja 2018-09-12 188 if (ret)
b321725257c173 Rajan Vaja 2018-09-12 189 return ret;
b321725257c173 Rajan Vaja 2018-09-12 190
b321725257c173 Rajan Vaja 2018-09-12 191 return len;
b321725257c173 Rajan Vaja 2018-09-12 192 }
b321725257c173 Rajan Vaja 2018-09-12 193
b321725257c173 Rajan Vaja 2018-09-12 194 /**
b321725257c173 Rajan Vaja 2018-09-12 195 * zynqmp_pm_debugfs_api_read() - debugfs read function
b321725257c173 Rajan Vaja 2018-09-12 196 * @file: User file
b321725257c173 Rajan Vaja 2018-09-12 197 * @ptr: Requested pm_api_version string
b321725257c173 Rajan Vaja 2018-09-12 198 * @len: Length of the userspace buffer
b321725257c173 Rajan Vaja 2018-09-12 199 * @off: Offset within the file
b321725257c173 Rajan Vaja 2018-09-12 200 *
b321725257c173 Rajan Vaja 2018-09-12 201 * Return: Length of the version string on success
b321725257c173 Rajan Vaja 2018-09-12 202 * else error code
b321725257c173 Rajan Vaja 2018-09-12 203 */
364564d3dba6ce Jens Axboe 2024-04-09 204 static ssize_t zynqmp_pm_debugfs_api_read(struct kiocb *iocb,
364564d3dba6ce Jens Axboe 2024-04-09 205 struct iov_iter *to)
b321725257c173 Rajan Vaja 2018-09-12 @206 {
364564d3dba6ce Jens Axboe 2024-04-09 207 return simple_copy_to_iter(debugfs_buf, &iocb->ki_pos,
364564d3dba6ce Jens Axboe 2024-04-09 208 strlen(debugfs_buf), to);
b321725257c173 Rajan Vaja 2018-09-12 209 }
b321725257c173 Rajan Vaja 2018-09-12 210
:::::: The code at line 148 was first introduced by commit
:::::: b321725257c17335b6a8388530366caa2c581084 firmware: xilinx: Add debugfs interface
:::::: TO: Rajan Vaja <rajanv@xilinx.com>
:::::: CC: Michal Simek <michal.simek@xilinx.com>
--
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-13 12:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-13 12:45 [axboe-block:rw_iter 427/438] drivers/firmware/xilinx/zynqmp-debug.c:148: warning: Function parameter or struct member 'iocb' not described in 'zynqmp_pm_debugfs_api_write' 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