lkml.org 
[lkml]   [2021]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] ishtp: Add support for Intel ishtp eclite driver
Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20210708]
[cannot apply to v5.13]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/sumesh-k-naduvalath-intel-com/ishtp-Add-support-for-Intel-ishtp-eclite-driver/20210708-192016
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e9f1cbc0c4114880090c7a578117d3b9cf184ad4
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/0360e181285d78d02e2d8bfd8bcf73b0d61268dd
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sumesh-k-naduvalath-intel-com/ishtp-Add-support-for-Intel-ishtp-eclite-driver/20210708-192016
git checkout 0360e181285d78d02e2d8bfd8bcf73b0d61268dd
# save the attached .config to linux build tree
make W=1 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/x86/intel_ishtp_eclite.c: In function 'ecl_ishtp_cl_probe':
>> drivers/platform/x86/intel_ishtp_eclite.c:606:2: error: implicit declaration of function 'acpi_walk_dep_device_list' [-Werror=implicit-function-declaration]
606 | acpi_walk_dep_device_list(opr_dev->acpi_handle);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/intel_ishtp_eclite.c: At top level:
>> drivers/platform/x86/intel_ishtp_eclite.c:681:12: error: initialization of 'void (*)(struct ishtp_cl_device *)' from incompatible pointer type 'int (*)(struct ishtp_cl_device *)' [-Werror=incompatible-pointer-types]
681 | .remove = ecl_ishtp_cl_remove,
| ^~~~~~~~~~~~~~~~~~~
drivers/platform/x86/intel_ishtp_eclite.c:681:12: note: (near initialization for 'ecl_ishtp_cl_driver.remove')
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PHY_SPARX5_SERDES
Depends on (ARCH_SPARX5 || COMPILE_TEST && OF && HAS_IOMEM
Selected by
- SPARX5_SWITCH && NETDEVICES && ETHERNET && NET_VENDOR_MICROCHIP && NET_SWITCHDEV && HAS_IOMEM


vim +/acpi_walk_dep_device_list +606 drivers/platform/x86/intel_ishtp_eclite.c

551
552 static int ecl_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
553 {
554 struct ishtp_cl *ecl_ishtp_cl;
555 struct ishtp_opregion_dev *opr_dev;
556 int rv;
557
558 opr_dev = devm_kzalloc(ishtp_device(cl_device), sizeof(*opr_dev),
559 GFP_KERNEL);
560 if (!opr_dev)
561 return -ENOMEM;
562
563 ecl_ishtp_cl = ishtp_cl_allocate(cl_device);
564 if (!ecl_ishtp_cl)
565 return -ENOMEM;
566
567 ishtp_set_drvdata(cl_device, ecl_ishtp_cl);
568 ishtp_set_client_data(ecl_ishtp_cl, opr_dev);
569 opr_dev->ecl_ishtp_cl = ecl_ishtp_cl;
570 opr_dev->cl_device = cl_device;
571
572 init_waitqueue_head(&opr_dev->read_wait);
573 INIT_WORK(&opr_dev->event_work, ecl_acpi_invoke_dsm);
574 INIT_WORK(&opr_dev->reset_work, ecl_ishtp_cl_reset_handler);
575
576 /* Initialize ish client device */
577 rv = ecl_ishtp_cl_init(ecl_ishtp_cl);
578 if (rv) {
579 dev_err(cl_data_to_dev(opr_dev), "Client init failed\n");
580 goto err_exit;
581 }
582
583 dev_dbg(cl_data_to_dev(opr_dev), "eclite-ishtp client initialised\n");
584
585 /* Register a handler for eclite fw events */
586 ishtp_register_event_cb(cl_device, ecl_ishtp_cl_event_cb);
587
588 opr_dev->ish_link_ready = true;
589 mutex_init(&opr_dev->lock);
590
591 /* Now find ACPI device and init opregion handlers */
592 rv = acpi_find_eclite_device(opr_dev);
593 if (rv) {
594 dev_err(cl_data_to_dev(opr_dev), "ECLite ACPI ID not found\n");
595
596 goto err_exit;
597 }
598 rv = acpi_opregion_init(opr_dev);
599 if (rv) {
600 dev_err(cl_data_to_dev(opr_dev), "ACPI opregion init failed\n");
601
602 goto err_exit;
603 }
604
605 /* Reprobe devices depending on ECLite - battery, fan, etc. */
> 606 acpi_walk_dep_device_list(opr_dev->acpi_handle);
607
608 return 0;
609 err_exit:
610 ishtp_set_connection_state(ecl_ishtp_cl, ISHTP_CL_DISCONNECTING);
611 ishtp_cl_disconnect(ecl_ishtp_cl);
612 ecl_ishtp_cl_deinit(ecl_ishtp_cl);
613
614 return rv;
615 }
616
617 static int ecl_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
618 {
619 struct ishtp_cl *ecl_ishtp_cl = ishtp_get_drvdata(cl_device);
620 struct ishtp_opregion_dev *opr_dev =
621 ishtp_get_client_data(ecl_ishtp_cl);
622
623 if (opr_dev->acpi_init_done)
624 acpi_opregion_deinit(opr_dev);
625
626 cancel_work_sync(&opr_dev->reset_work);
627 cancel_work_sync(&opr_dev->event_work);
628
629 ishtp_set_connection_state(ecl_ishtp_cl, ISHTP_CL_DISCONNECTING);
630 ishtp_cl_disconnect(ecl_ishtp_cl);
631 ecl_ishtp_cl_deinit(ecl_ishtp_cl);
632
633 return 0;
634 }
635
636 static int ecl_ishtp_cl_reset(struct ishtp_cl_device *cl_device)
637 {
638 struct ishtp_cl *ecl_ishtp_cl = ishtp_get_drvdata(cl_device);
639 struct ishtp_opregion_dev *opr_dev =
640 ishtp_get_client_data(ecl_ishtp_cl);
641
642 schedule_work(&opr_dev->reset_work);
643
644 return 0;
645 }
646
647 static int ecl_ishtp_cl_suspend(struct device *device)
648 {
649 struct ishtp_cl_device *cl_device = ishtp_dev_to_cl_device(device);
650 struct ishtp_cl *ecl_ishtp_cl = ishtp_get_drvdata(cl_device);
651 struct ishtp_opregion_dev *opr_dev =
652 ishtp_get_client_data(ecl_ishtp_cl);
653
654 if (acpi_target_system_state() == ACPI_STATE_S0)
655 return 0;
656
657 acpi_opregion_deinit(opr_dev);
658 ecl_ish_cl_enable_events(opr_dev, false);
659
660 return 0;
661 }
662
663 static int ecl_ishtp_cl_resume(struct device *device)
664 {
665 /* A reset is expected to call after an Sx. At this point
666 * we are not sure if the link is up or not to restore anything,
667 * so do nothing in resume path
668 */
669 return 0;
670 }
671
672 static const struct dev_pm_ops ecl_ishtp_pm_ops = {
673 .suspend = ecl_ishtp_cl_suspend,
674 .resume = ecl_ishtp_cl_resume,
675 };
676
677 static struct ishtp_cl_driver ecl_ishtp_cl_driver = {
678 .name = "ishtp-eclite",
679 .guid = &ecl_ishtp_guid,
680 .probe = ecl_ishtp_cl_probe,
> 681 .remove = ecl_ishtp_cl_remove,
682 .reset = ecl_ishtp_cl_reset,
683 .driver.pm = &ecl_ishtp_pm_ops,
684 };
685

---
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: 2021-07-08 22:11    [W:0.042 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site