Messages in this thread | | | Date | Thu, 1 Mar 2018 08:26:03 +0800 | From | kbuild test robot <> | Subject | Re: [PATCH v2 5/6] platform/chrome: cros_ec_debugfs: Add PD port info to debugfs |
| |
Hi Shawn,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on ljones-mfd/for-mfd-next] [also build test ERROR on v4.16-rc3 next-20180228] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Enric-Balletbo-i-Serra/platform-chrome-cros_ec_sysfs-Modify-error-handling/20180223-053556 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/platform/chrome/cros_ec_debugfs.c: In function 'cros_ec_pdinfo_read': >> drivers/platform/chrome/cros_ec_debugfs.c:219:16: error: 'EC_USB_PD_MAX_PORTS' undeclared (first use in this function); did you mean 'EC_CMD_USB_PD_PORTS'? char read_buf[EC_USB_PD_MAX_PORTS * 40], *p = read_buf; ^~~~~~~~~~~~~~~~~~~ EC_CMD_USB_PD_PORTS drivers/platform/chrome/cros_ec_debugfs.c:219:16: note: each undeclared identifier is reported only once for each function it appears in drivers/platform/chrome/cros_ec_debugfs.c:219:7: warning: unused variable 'read_buf' [-Wunused-variable] char read_buf[EC_USB_PD_MAX_PORTS * 40], *p = read_buf; ^~~~~~~~ drivers/platform/chrome/cros_ec_debugfs.c:264:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
vim +219 drivers/platform/chrome/cros_ec_debugfs.c
213 214 static ssize_t cros_ec_pdinfo_read(struct file *file, 215 char __user *user_buf, 216 size_t count, 217 loff_t *ppos) 218 { > 219 char read_buf[EC_USB_PD_MAX_PORTS * 40], *p = read_buf; 220 struct cros_ec_debugfs *debug_info = file->private_data; 221 struct cros_ec_device *ec_dev = debug_info->ec->ec_dev; 222 struct { 223 struct cros_ec_command msg; 224 union { 225 struct ec_response_usb_pd_control_v1 resp; 226 struct ec_params_usb_pd_control params; 227 }; 228 } __packed ec_buf; 229 struct cros_ec_command *msg; 230 struct ec_response_usb_pd_control_v1 *resp; 231 struct ec_params_usb_pd_control *params; 232 int i; 233 234 msg = &ec_buf.msg; 235 params = (struct ec_params_usb_pd_control *)msg->data; 236 resp = (struct ec_response_usb_pd_control_v1 *)msg->data; 237 238 msg->command = EC_CMD_USB_PD_CONTROL; 239 msg->version = 1; 240 msg->insize = sizeof(*resp); 241 msg->outsize = sizeof(*params); 242 243 /* 244 * Read status from all PD ports until failure, typically caused 245 * by attempting to read status on a port that doesn't exist. 246 */ 247 for (i = 0; i < EC_USB_PD_MAX_PORTS; ++i) { 248 params->port = i; 249 params->role = 0; 250 params->mux = 0; 251 params->swap = 0; 252 253 if (cros_ec_cmd_xfer_status(ec_dev, msg) < 0) 254 break; 255 256 p += scnprintf(p, sizeof(read_buf) + read_buf - p, 257 "p%d: %s en:%.2x role:%.2x pol:%.2x\n", i, 258 resp->state, resp->enabled, resp->role, 259 resp->polarity); 260 } 261 262 return simple_read_from_buffer(user_buf, count, ppos, 263 read_buf, p - read_buf); 264 } 265
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [unhandled content-type:application/gzip] | |