Re: [PATCH v1] hwmon: (yogafan) Massive hardware expansion and structural refactoring
From: Rong Zhang
Date: Sat Apr 18 2026 - 11:20:56 EST
Hi Guenter,
On Sat, 2026-04-18 at 06:49 -0700, Guenter Roeck wrote:
> On 4/18/26 04:23, Rong Zhang wrote:
> > Hi Sergio,
> >
> > On Sat, 2026-04-18 at 18:31 +0800, Rong Zhang wrote:
> > > Hi Sergio,
> > >
> > > On Sat, 2026-04-18 at 05:37 +0800, kernel test robot wrote:
> > > > Hi Sergio,
> > > >
> > > > kernel test robot noticed the following build errors:
> > > >
> > > > [auto build test ERROR on groeck-staging/hwmon-next]
> > > > [also build test ERROR on linus/master next-20260416]
> > > > [cannot apply to v7.0]
> > > > [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#_base_tree_information]
> > > >
> > > > url: https://github.com/intel-lab-lkp/linux/commits/Sergio-Melas/hwmon-yogafan-Massive-hardware-expansion-and-structural-refactoring/20260417-063319
> > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
> > > > patch link: https://lore.kernel.org/r/20260413060931.31091-2-sergiomelas%40gmail.com
> > > > patch subject: [PATCH v1] hwmon: (yogafan) Massive hardware expansion and structural refactoring
> > > > config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20260418/202604180539.EuswNnjG-lkp@xxxxxxxxx/config)
> > > > compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
> > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260418/202604180539.EuswNnjG-lkp@xxxxxxxxx/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@xxxxxxxxx>
> > > > > Closes: https://lore.kernel.org/oe-kbuild-all/202604180539.EuswNnjG-lkp@xxxxxxxxx/
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > > > > drivers/hwmon/yogafan.c:712:6: error: call to undeclared function 'wmi_has_guid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> > > > 712 | if (wmi_has_guid(LENOVO_WMI_OTHER_MODE_GUID) ||
> > > > | ^
> > > > 1 error generated.
> > >
> > > Hmm, that's a bit troublesome. Usually we should have been able to
> > > declare `depends on ACPI_WMI if ACPI_WMI' (new syntax since v7.0) or
> > > `depends on ACPI_WMI || !ACPI_WMI' as an optional dependency to prevent
> > > such an issue, but there is no static inline stubs for !ACPI_WMI...
> > >
> > > I'd suggest declaring `select ACPI_WMI if ACPI && X86' in Kconfig as
> > > some drm drivers do, at least for the time being.
> >
> > Of course you'll still need to guard the wmi_has_guid() checks behind
> > `#ifdef CONFIG_ACPI_WMI'. Just forgot to mention that.
> >
> > Hmm, in this way `depends on ACPI_WMI if ACPI_WMI' should also be OK...
>
> I don't know is this is a misspelling, but `depends on ACPI_WMI if ACPI_WMI'
> doesn't make any sense.
This is the new syntax for optional dependencies since commit
76df6815dab7 ("kconfig: Support conditional deps using "depends on X if
Y""), which is equivalent to the old-fashioned `depends on ACPI_WMI ||
!ACPI_WMI'.
It's needed to prevent the combination of CONFIG_ACPI_WMI=m +
CONFIG_SENSORS_YOGAFAN=y, which leads to linkage error. Considering that
yogafan doesn't really need the WMI driver core except for
wmi_has_guid(), it also makes yogafan possible to build with
CONFIG_ACPI_WMI=n, which implies CONFIG_LENOVO_WMI_TUNING=n (the config
entry for lenovo-wmi-other). No double reporting is possible in this
case and hence the GUID check is not needed at all when
CONFIG_ACPI_WMI=n.
Thanks,
Rong
>
> Guenter