mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Armin Wolf <W_Armin@gmx.de>,  Hans de Goede <hdegoede@redhat.com>,
	Benson Leung <bleung@chromium.org>,
	 Guenter Roeck <groeck@chromium.org>,
	linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev,
	 linux-pm@vger.kernel.org
Subject: Re: [PATCH v6 4/4] power: supply: core: add UAPI to discover currently used extensions
Date: Wed, 18 Dec 2024 23:16:16 +0100	[thread overview]
Message-ID: <26833b6c-834d-433b-8d80-0ad39b1c968e@t-8ch.de> (raw)
In-Reply-To: <otwk52a7nkle7yx3444swh5xasm3l6lmu2suapmvjuplezihyv@p6vrs6lo454e>

On 2024-12-18 23:11:35+0100, Sebastian Reichel wrote:
> On Wed, Dec 18, 2024 at 09:29:31PM +0100, Thomas Weißschuh wrote:
> > On 2024-12-18 12:52:29-0700, Nathan Chancellor wrote:
> > > I am seeing a build failure in certain configurations because
> > > power_supply_extension_group is only declared under a CONFIG_SYSFS ifdef
> > > but this code can be built without CONFIG_SYSFS.
> > 
> > Thanks for the report.
> > 
> > >   $ echo 'CONFIG_EXPERT=y
> > >   CONFIG_SYSFS=n' >allno.config
> > > 
> > >   $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux- KCONFIG_ALLCONFIG=1 mrproper allnoconfig drivers/power/supply/power_supply_core.o
> > >   drivers/power/supply/power_supply_core.c: In function 'power_supply_register_extension':
> > >   drivers/power/supply/power_supply_core.c:1389:55: error: 'power_supply_extension_group' undeclared (first use in this function); did you mean 'power_supply_attr_groups'?
> > >    1389 |         ret = sysfs_add_link_to_group(&psy->dev.kobj, power_supply_extension_group.name,
> > >         |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >         |                                                       power_supply_attr_groups
> > >   drivers/power/supply/power_supply_core.c:1389:55: note: each undeclared identifier is reported only once for each function it appears in
> > >   drivers/power/supply/power_supply_core.c: In function 'power_supply_unregister_extension':
> > >   drivers/power/supply/power_supply_core.c:1419:54: error: 'power_supply_extension_group' undeclared (first use in this function); did you mean 'power_supply_attr_groups'?
> > >    1419 |                                                      power_supply_extension_group.name,
> > >         |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >         |                                                      power_supply_attr_groups
> > 
> > The reproducer doesn't actually enable CONFIG_POWER_SUPPLY, when I use it
> > I get a whole array of errors.
> > 
> > > Should the declaration be moved out from the ifdef or is there some
> > > other solution I am not seeing?
> > 
> > This, inline constants or a #define.
> > 
> > Sebastian, do you want me to send a patch?
> 
> Yes, please send a patch. I suppose a define next to the NULL define
> for power_supply_attr_groups should be good enough and consistent
> with existing handling of this problem in the subsystem. 

That doesn't work because of the usage of the member "name" of the
symbol power_supply_extension_group.

  reply	other threads:[~2024-12-18 22:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 19:57 [PATCH v6 0/4] power: supply: extension API Thomas Weißschuh
2024-12-11 19:57 ` [PATCH v6 1/4] power: supply: core: implement " Thomas Weißschuh
2024-12-13 22:48   ` Armin Wolf
2024-12-11 19:57 ` [PATCH v6 2/4] power: supply: test-power: implement a power supply extension Thomas Weißschuh
2024-12-11 19:57 ` [PATCH v6 3/4] power: supply: cros_charge-control: " Thomas Weißschuh
2024-12-11 19:57 ` [PATCH v6 4/4] power: supply: core: add UAPI to discover currently used extensions Thomas Weißschuh
2024-12-13 22:50   ` Armin Wolf
2024-12-14  7:53   ` Thomas Weißschuh
2024-12-18 19:52   ` Nathan Chancellor
2024-12-18 20:29     ` Thomas Weißschuh
2024-12-18 22:11       ` Sebastian Reichel
2024-12-18 22:16         ` Thomas Weißschuh [this message]
2024-12-18 22:46           ` Sebastian Reichel
2024-12-12 14:27 ` [PATCH v6 0/4] power: supply: extension API Armin Wolf
2024-12-13 21:00   ` Thomas Weißschuh
2024-12-14  3:26 ` (subset) " Sebastian Reichel
2024-12-14 22:04 ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26833b6c-834d-433b-8d80-0ad39b1c968e@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=W_Armin@gmx.de \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®