From: Janne Grunau <j@jannau.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2] ACPI: platform_profile: Stub platform_profile_cycle
Date: Sun, 18 May 2025 16:45:48 +0200 [thread overview]
Message-ID: <20250518144548.GA2575813@robin.jannau.net> (raw)
In-Reply-To: <b939dc57-74cd-42e8-b1f3-54ea32829212@app.fastmail.com>
On Sun, May 18, 2025 at 12:42:36PM +0200, Arnd Bergmann wrote:
> On Sun, May 18, 2025, at 12:18, Janne Grunau via B4 Relay wrote:
> *ops);
> > +#ifdef CONFIG_ACPI_PLATFORM_PROFILE
> > int platform_profile_cycle(void);
> > +#else
>
> CONFIG_ACPI_PLATFORM_PROFILE is a 'tristate' symbol, so the #ifdef
> check is wrong here when both the caller and the platform profile
> are in a loadable module.
>
> I think what you want here is
>
> #if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)
ack, kernel test robot already complained
> Alternatively, you could move that check into the caller
> and do
>
> if (IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE))
> ret = platform_profile_cycle();
>
> which makes it a little easier to catch build failures in
> drivers that are missing the 'select ACPI_PLATFORM_PROFILE'.
I think I'll go with this for v2 and remove the "ACPI || !ACPI" from
Patch 2.
thanks,
Janne
next prev parent reply other threads:[~2025-05-18 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-18 10:18 [PATCH 0/2] Remove HID_LENOVO's dependency on ACPI Janne Grunau via B4 Relay
2025-05-18 10:18 ` [PATCH 1/2] ACPI: platform_profile: Stub platform_profile_cycle Janne Grunau via B4 Relay
2025-05-18 10:42 ` Arnd Bergmann
2025-05-18 14:45 ` Janne Grunau [this message]
2025-05-18 12:38 ` kernel test robot
2025-05-18 10:18 ` [PATCH 2/2] HID: lenovo: Remove CONFIG_ACPI dependency Janne Grunau via B4 Relay
2025-05-18 10:36 ` Arnd Bergmann
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=20250518144548.GA2575813@robin.jannau.net \
--to=j@jannau.net \
--cc=arnd@arndb.de \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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