lkml.org 
[lkml]   [2020]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 8911a35180c6777188fefe0954a2451a2b91deaf)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/platform/chrome/cros_ec_uart.c:353:9: error: implicit declaration of function 'cros_ec_register' [-Werror,-Wimplicit-function-declaration]
return cros_ec_register(ec_dev);
^
>> drivers/platform/chrome/cros_ec_uart.c:360:2: error: implicit declaration of function 'cros_ec_unregister' [-Werror,-Wimplicit-function-declaration]
cros_ec_unregister(ec_dev);
^
>> drivers/platform/chrome/cros_ec_uart.c:367:9: error: implicit declaration of function 'cros_ec_suspend' [-Werror,-Wimplicit-function-declaration]
return cros_ec_suspend(ec_dev);
^
drivers/platform/chrome/cros_ec_uart.c:367:9: note: did you mean 'cros_ec_uart_suspend'?
drivers/platform/chrome/cros_ec_uart.c:363:27: note: 'cros_ec_uart_suspend' declared here
static int __maybe_unused cros_ec_uart_suspend(struct device *dev)
^
>> drivers/platform/chrome/cros_ec_uart.c:374:9: error: implicit declaration of function 'cros_ec_resume' [-Werror,-Wimplicit-function-declaration]
return cros_ec_resume(ec_dev);
^
4 errors generated.

vim +/cros_ec_register +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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-06-26 11:39    [W:0.081 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site