* Re: [PATCH v4 6/7] platform/x86: lenovo-wmi-capdata: Wire up Fan Test Data
[not found] <20251113191152.96076-7-i@rong.moe>
@ 2025-11-14 9:48 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-14 9:48 UTC (permalink / raw)
To: Rong Zhang, Mark Pearson, Derek J. Clark, Armin Wolf,
Hans de Goede, Ilpo Järvinen
Cc: llvm, oe-kbuild-all, Rong Zhang, Guenter Roeck,
platform-driver-x86, linux-kernel, linux-hwmon
Hi Rong,
kernel test robot noticed the following build errors:
[auto build test ERROR on 2ccec5944606ee1389abc7ee41986825c6ceb574]
url: https://github.com/intel-lab-lkp/linux/commits/Rong-Zhang/platform-x86-lenovo-wmi-helpers-Convert-returned-buffer-into-u32/20251114-032343
base: 2ccec5944606ee1389abc7ee41986825c6ceb574
patch link: https://lore.kernel.org/r/20251113191152.96076-7-i%40rong.moe
patch subject: [PATCH v4 6/7] platform/x86: lenovo-wmi-capdata: Wire up Fan Test Data
config: x86_64-buildonly-randconfig-001-20251114 (https://download.01.org/0day-ci/archive/20251114/202511141750.9JubdfJr-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251114/202511141750.9JubdfJr-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511141750.9JubdfJr-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/platform/x86/lenovo/wmi-capdata.c:124:27: warning: cast to smaller integer type 'enum lwmi_cd_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
124 | enum lwmi_cd_type type = (enum lwmi_cd_type)data;
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/x86/lenovo/wmi-capdata.c:711:40: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
711 | ret = lwmi_cd00_get_data(priv->list, LWMI_ATTR_ID_FAN_TEST, &capdata00);
| ^
drivers/platform/x86/lenovo/wmi-capdata.c:56:3: note: expanded from macro 'LWMI_ATTR_ID_FAN_TEST'
56 | (FIELD_PREP(LWMI_ATTR_DEV_ID_MASK, LWMI_DEVICE_ID_FAN) | \
| ^
1 warning and 1 error generated.
vim +/FIELD_PREP +711 drivers/platform/x86/lenovo/wmi-capdata.c
685
686 static int lwmi_cd_probe(struct wmi_device *wdev, const void *context)
687 {
688 const struct lwmi_cd_info *info = context;
689 struct lwmi_cd_priv *priv;
690 int ret;
691
692 if (!info)
693 return -EINVAL;
694
695 priv = devm_kzalloc(&wdev->dev, sizeof(*priv), GFP_KERNEL);
696 if (!priv)
697 return -ENOMEM;
698
699 priv->wdev = wdev;
700 dev_set_drvdata(&wdev->dev, priv);
701
702 ret = lwmi_cd_setup(priv, info->type);
703 if (ret)
704 goto out;
705
706 switch (info->type) {
707 case LENOVO_CAPABILITY_DATA_00: {
708 enum lwmi_cd_type sub_component_type = LENOVO_FAN_TEST_DATA;
709 struct capdata00 capdata00;
710
> 711 ret = lwmi_cd00_get_data(priv->list, LWMI_ATTR_ID_FAN_TEST, &capdata00);
712 if (ret || !(capdata00.supported & LWMI_SUPP_VALID)) {
713 dev_dbg(&wdev->dev, "capdata00 declares no fan test support\n");
714 sub_component_type = CD_TYPE_NONE;
715 }
716
717 /* Sub-master (capdata00) <-> sub-component (capdata_fan) */
718 ret = lwmi_cd_sub_master_add(priv, sub_component_type);
719 if (ret)
720 goto out;
721
722 /* Master (lenovo-wmi-other) <-> sub-master (capdata00) */
723 ret = component_add(&wdev->dev, &lwmi_cd_component_ops);
724 goto out;
725 }
726 case LENOVO_CAPABILITY_DATA_01:
727 priv->acpi_nb.notifier_call = lwmi_cd01_notifier_call;
728
729 ret = register_acpi_notifier(&priv->acpi_nb);
730 if (ret)
731 goto out;
732
733 ret = devm_add_action_or_reset(&wdev->dev, lwmi_cd01_unregister,
734 &priv->acpi_nb);
735 if (ret)
736 goto out;
737
738 ret = component_add(&wdev->dev, &lwmi_cd_component_ops);
739 goto out;
740 case LENOVO_FAN_TEST_DATA:
741 ret = component_add(&wdev->dev, &lwmi_cd_sub_component_ops);
742 goto out;
743 default:
744 return -EINVAL;
745 }
746 out:
747 if (ret) {
748 dev_err(&wdev->dev, "failed to register %s: %d\n",
749 info->name, ret);
750 } else {
751 dev_info(&wdev->dev, "registered %s with %u items\n",
752 info->name, priv->list->count);
753 }
754 return ret;
755 }
756
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-14 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20251113191152.96076-7-i@rong.moe>
2025-11-14 9:48 ` [PATCH v4 6/7] platform/x86: lenovo-wmi-capdata: Wire up Fan Test Data kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).