From: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
To: Andreas Haufler <andreas@haufler.info>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/lib/thermal: fix misplaced extern "C" closing brace
Date: Fri, 7 Aug 2026 16:15:22 +0200 [thread overview]
Message-ID: <04bab99c-eb54-4f03-b69a-f9f1781f30af@oss.qualcomm.com> (raw)
In-Reply-To: <20260721083230.91246-1-andreas@haufler.info>
On 7/21/26 10:32, Andreas Haufler wrote:
> The public libthermal header opens the C++ 'extern "C" {' block inside
> the __LIBTHERMAL_H include guard, but places the closing brace after
> the guard has already ended:
>
> #endif /* __LIBTHERMAL_H */
>
> #ifdef __cplusplus
> }
> #endif
>
> On a single inclusion the braces still balance, so the problem is
> invisible. On the second inclusion of the header in the same C++
> translation unit the include guard skips the opening 'extern "C" {',
> while the closing '}' lives outside the guard and is emitted anyway.
> This leaves a stray '}' and breaks compilation for any C++ consumer
> that includes the header more than once.
>
> Move the closing block inside the include guard so both halves of the
> 'extern "C"' declaration are guarded consistently.
>
> Signed-off-by: Andreas Haufler <andreas@haufler.info>
> ---
Applied, thanks for the fix
prev parent reply other threads:[~2026-08-07 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 8:32 Andreas Haufler
2026-08-07 14:15 ` Daniel Lezcano [this message]
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=04bab99c-eb54-4f03-b69a-f9f1781f30af@oss.qualcomm.com \
--to=daniel.lezcano@oss.qualcomm.com \
--cc=andreas@haufler.info \
--cc=daniel.lezcano@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.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®