[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <170915813338.50142.16479593478459212798.b4-ty@collabora.com>
Date: Wed, 28 Feb 2024 23:08:53 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Sebastian Reichel <sre@...nel.org>,
"Ricardo B. Marliere" <ricardo@...liere.net>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH] power: supply: move power_supply_attr_group into
#ifdef block
On Wed, 28 Feb 2024 10:46:28 -0300, Ricardo B. Marliere wrote:
> When building with CONFIG_SYSFS=n, the build error below is triggered:
>
> ld: drivers/power/supply/power_supply_core.o:(.data+0x0): undefined
> reference to `power_supply_attr_group'
>
> The problem is that power_supply_attr_group is needed in
> power_supply_core.c but defined in power_supply_sysfs.c, which is only
> targeted with CONFIG_SYSFS=y. Therefore, move the extern declaration into
> the #ifdef block that checks for CONFIG_SYSFS, and define an empty static
> const struct otherwise. This is safe because the macro __ATRIBUTE_GROUPS in
> power_supply_core.c will expand into an empty attribute_group array.
>
> [...]
Applied, thanks!
[1/1] power: supply: move power_supply_attr_group into #ifdef block
commit: ea4367c40c79a5f16cb0de8a94a6b72697d37f06
Best regards,
--
Sebastian Reichel <sebastian.reichel@...labora.com>
Powered by blists - more mailing lists