[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202006260815.k3uMEadO%lkp@intel.com>
Date: Fri, 26 Jun 2020 08:18:25 +0800
From: kernel test robot <lkp@...el.com>
To: Bhanu Prakash Maiya <bhanumaiya@...omium.org>,
linux-arm-kernel@...ts.infradead.org
Cc: kbuild-all@...ts.01.org, Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Guenter Roeck <groeck@...omium.org>,
linux-kernel@...r.kernel.org, "Lee Jones )" <lee.jones@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Raul E Rangel <rrangel@...omium.org>,
Furquan Shaikh <furquan@...omium.org>,
Duncan Laurie <dlaurie@...gle.com>
Subject: Re: [PATCH 1/2] cros: platform/chrome: Add cros-ec-uart driver for
uart support
Hi Bhanu,
I love your patch! Yet something to improve:
[auto build test ERROR on chrome-platform-linux/for-next]
[also build test ERROR on soc/for-next ljones-mfd/for-mfd-next linus/master v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Bhanu-Prakash-Maiya/cros-platform-chrome-Add-cros-ec-uart-driver-for-uart-support/20200626-053602
base: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/platform/chrome/cros_ec_uart.c: In function 'cros_ec_uart_probe':
>> drivers/platform/chrome/cros_ec_uart.c:353:9: error: implicit declaration of function 'cros_ec_register'; did you mean 'driver_register'? [-Werror=implicit-function-declaration]
353 | return cros_ec_register(ec_dev);
| ^~~~~~~~~~~~~~~~
| driver_register
drivers/platform/chrome/cros_ec_uart.c: In function 'cros_ec_uart_remove':
>> drivers/platform/chrome/cros_ec_uart.c:360:2: error: implicit declaration of function 'cros_ec_unregister'; did you mean 'driver_unregister'? [-Werror=implicit-function-declaration]
360 | cros_ec_unregister(ec_dev);
| ^~~~~~~~~~~~~~~~~~
| driver_unregister
drivers/platform/chrome/cros_ec_uart.c: In function 'cros_ec_uart_suspend':
>> drivers/platform/chrome/cros_ec_uart.c:367:9: error: implicit declaration of function 'cros_ec_suspend'; did you mean 'cros_ec_uart_suspend'? [-Werror=implicit-function-declaration]
367 | return cros_ec_suspend(ec_dev);
| ^~~~~~~~~~~~~~~
| cros_ec_uart_suspend
drivers/platform/chrome/cros_ec_uart.c: In function 'cros_ec_uart_resume':
>> drivers/platform/chrome/cros_ec_uart.c:374:9: error: implicit declaration of function 'cros_ec_resume'; did you mean 'cros_ec_uart_resume'? [-Werror=implicit-function-declaration]
374 | return cros_ec_resume(ec_dev);
| ^~~~~~~~~~~~~~
| cros_ec_uart_resume
cc1: some warnings being treated as errors
vim +353 drivers/platform/chrome/cros_ec_uart.c
292
293 static int cros_ec_uart_probe(struct serdev_device *serdev)
294 {
295 struct device *dev = &serdev->dev;
296 struct cros_ec_device *ec_dev;
297 struct cros_ec_uart *ec_uart;
298 int ret;
299
300 ec_uart = devm_kzalloc(dev, sizeof(*ec_uart), GFP_KERNEL);
301 if (!ec_uart)
302 return -ENOMEM;
303
304 ec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);
305 if (!ec_dev)
306 return -ENOMEM;
307
308 ec_uart->serdev = serdev;
309
310 /* Open the serial device */
311 ret = devm_serdev_device_open(dev, ec_uart->serdev);
312 if (ret) {
313 dev_err(dev, "Unable to open UART device %s",
314 dev_name(&serdev->dev));
315 return ret;
316 }
317
318 serdev_device_set_drvdata(serdev, ec_dev);
319
320 serdev_device_set_client_ops(serdev, &cros_ec_uart_client_ops);
321
322 /* Initialize wait queue */
323 init_waitqueue_head(&ec_uart->response.wait_queue);
324
325 ret = cros_ec_uart_acpi_probe(ec_uart);
326 if (ret < 0) {
327 dev_err(dev, "Failed to get ACPI info (%d)", ret);
328 return ret;
329 }
330
331 /* Set baud rate of serial device */
332 ret = serdev_device_set_baudrate(serdev, ec_uart->baudrate);
333 if (ret < 0) {
334 dev_err(dev, "Failed to set up host baud rate (%d)", ret);
335 return ret;
336 }
337
338 /* Set flow control of serial device */
339 serdev_device_set_flow_control(serdev, ec_uart->flowcontrol);
340
341 /* Initialize ec_dev for cros_ec */
342 ec_dev->phys_name = dev_name(&ec_uart->serdev->dev);
343 ec_dev->dev = dev;
344 ec_dev->priv = ec_uart;
345 ec_dev->irq = ec_uart->irq;
346 ec_dev->cmd_xfer = NULL;
347 ec_dev->pkt_xfer = cros_ec_uart_pkt_xfer;
348 ec_dev->din_size = sizeof(struct ec_host_response) +
349 sizeof(struct ec_response_get_protocol_info);
350 ec_dev->dout_size = sizeof(struct ec_host_request);
351
352 /* Register a new cros_ec device */
> 353 return cros_ec_register(ec_dev);
354 }
355
356 static void cros_ec_uart_remove(struct serdev_device *serdev)
357 {
358 struct cros_ec_device *ec_dev = serdev_device_get_drvdata(serdev);
359
> 360 cros_ec_unregister(ec_dev);
361 };
362
363 static int __maybe_unused cros_ec_uart_suspend(struct device *dev)
364 {
365 struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
366
> 367 return cros_ec_suspend(ec_dev);
368 }
369
370 static int __maybe_unused cros_ec_uart_resume(struct device *dev)
371 {
372 struct cros_ec_device *ec_dev = dev_get_drvdata(dev);
373
> 374 return cros_ec_resume(ec_dev);
375 }
376
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (74078 bytes)
Powered by blists - more mailing lists