From: kbuild test robot <lkp@intel.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: kbuild-all@01.org, Lee Jones <lee.jones@linaro.org>,
Benson Leung <bleung@chromium.org>,
linux-kernel@vger.kernel.org, kernel@collabora.com,
groeck@chromium.org, gwendal@chromium.org,
Shawn Nematbakhsh <shawnn@chromium.org>
Subject: Re: [PATCH 2/3] platform/chrome: cros_ec_debugfs: Add PD port info to debugfs
Date: Thu, 22 Feb 2018 08:25:26 +0800 [thread overview]
Message-ID: <201802220830.S3PHpwWI%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180221144909.13461-3-enric.balletbo@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 3542 bytes --]
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-rc2 next-20180221]
[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-debugfs-and-sysfs-updates/20180222-074242
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: i386-randconfig-s0-201807 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
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:221:16: error: 'EC_USB_PD_MAX_PORTS' undeclared (first use in this function)
char read_buf[EC_USB_PD_MAX_PORTS * 40], *p = read_buf;
^~~~~~~~~~~~~~~~~~~
drivers/platform/chrome/cros_ec_debugfs.c:221:16: note: each undeclared identifier is reported only once for each function it appears in
drivers/platform/chrome/cros_ec_debugfs.c:221: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:269:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +/EC_USB_PD_MAX_PORTS +221 drivers/platform/chrome/cros_ec_debugfs.c
215
216 static ssize_t cros_ec_pdinfo_read(struct file *file,
217 char __user *user_buf,
218 size_t count,
219 loff_t *ppos)
220 {
> 221 char read_buf[EC_USB_PD_MAX_PORTS * 40], *p = read_buf;
222 struct cros_ec_debugfs *debug_info = file->private_data;
223 struct cros_ec_device *ec_dev = debug_info->ec->ec_dev;
224
225 struct {
226 struct cros_ec_command msg;
227 union {
228 struct ec_response_usb_pd_control_v1 resp;
229 struct ec_params_usb_pd_control params;
230 };
231 } __packed ec_buf;
232
233 struct cros_ec_command *msg;
234 struct ec_response_usb_pd_control_v1 *resp;
235 struct ec_params_usb_pd_control *params;
236
237 int i;
238
239 msg = &ec_buf.msg;
240 params = (struct ec_params_usb_pd_control *)msg->data;
241 resp = (struct ec_response_usb_pd_control_v1 *)msg->data;
242
243 msg->command = EC_CMD_USB_PD_CONTROL;
244 msg->version = 1;
245 msg->insize = sizeof(*resp);
246 msg->outsize = sizeof(*params);
247
248 /*
249 * Read status from all PD ports until failure, typically caused
250 * by attempting to read status on a port that doesn't exist.
251 */
252 for (i = 0; i < EC_USB_PD_MAX_PORTS; ++i) {
253 params->port = i;
254 params->role = 0;
255 params->mux = 0;
256 params->swap = 0;
257
258 if (cros_ec_cmd_xfer_status(ec_dev, msg) < 0)
259 break;
260
261 p += scnprintf(p, sizeof(read_buf) + read_buf - p,
262 "p%d: %s en:%.2x role:%.2x pol:%.2x\n",
263 i, resp->state, resp->enabled, resp->role,
264 resp->polarity);
265 }
266
267 return simple_read_from_buffer(user_buf, count, ppos,
268 read_buf, p - read_buf);
269 }
270
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36975 bytes --]
next prev parent reply other threads:[~2018-02-22 0:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 14:49 [PATCH 0/3] platform/chrome: cros_ec debugfs and sysfs updates Enric Balletbo i Serra
2018-02-21 14:49 ` [PATCH 1/3] platform/chrome: cros_ec_sysfs: Modify error handling Enric Balletbo i Serra
2018-02-21 14:49 ` [PATCH 2/3] platform/chrome: cros_ec_debugfs: Add PD port info to debugfs Enric Balletbo i Serra
2018-02-21 15:06 ` Andy Shevchenko
2018-02-22 0:25 ` kbuild test robot [this message]
2018-02-22 11:56 ` Enric Balletbo Serra
2018-02-21 19:09 ` [PATCH 0/3] platform/chrome: cros_ec debugfs and sysfs updates Andy Shevchenko
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=201802220830.S3PHpwWI%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=bleung@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=gwendal@chromium.org \
--cc=kbuild-all@01.org \
--cc=kernel@collabora.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawnn@chromium.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®