From nobody Sat Jul 25 01:24:44 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 705863BADB2 for ; Tue, 21 Jul 2026 08:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784622763; cv=none; b=DgcDxqQAQ178eevpd2exMH6YlO/SI1l5Dhu/VOvvN228R73Hbg8X/BaBvKAQSwPoInb779lNy/aNmDXKCT8+0FiE4fkGqjJxYb8rwtucAJi5rD5iLu3AgXi3bNA43BCXYTluBx07LXSiBmo8b0mqSdS8W1J86vn67qikewIWdqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784622763; c=relaxed/simple; bh=jKbnK5jQJRNRxwNvjRw0RLSi9BVxk18FKKDZGSgAhpE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gRYe5XC2J4zxTdLmPi2vaoVMS/2uWzOR0Tl7RNaQcPrnsKMMAGD+Otg/l7TUtdBOa4T83e+/HjYE4vNVfjwy//+rLMuKksS3Jd0vNz/m+nYPf3oSEI9wnCmJCUCfdN79/FFHuzC84vs1s5mWJ532VJWIu6S3uw7ON6+W6zpyKK4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=haufler.info; spf=pass smtp.mailfrom=h2-ventures.de; dkim=pass (2048-bit key) header.d=haufler.info header.i=@haufler.info header.b=B1BYC5YS; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=haufler.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=h2-ventures.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=haufler.info header.i=@haufler.info header.b="B1BYC5YS" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4953f64372aso6212575e9.0 for ; Tue, 21 Jul 2026 01:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=haufler.info; s=google; t=1784622758; x=1785227558; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=mP8ESsGp3PDnVGRH0j1wFoDB1NTpcMuyoXK5rjNdngQ=; b=B1BYC5YSCXxhIi2x5Y1xE/DzshM3owS8E4TnDBEFtTY/DrtI1qDClHPNJtj/ruVpun jkF7Jhug7QBoS0begD7k71aNMgecpPgZYnhMUH67yBMQPANcrwjNWX+OmwwMRxtjoA6V cVvZx9XCEnwNRfiDTddTgcEjAE0hxQSmlH985dJa8czWtpp1OdY5k/r8UiuUZki/RuWs apC3i51mJDfYKw847WS8dwsH+UiqH+OFzEqHGpejJfJ38BxZJqg3GowSBVbc5cINIQBI AmlqMICLm01H9y2c9LOcgOZuxMZPyb0MMYZAlegOxj1/OuiGnFCoQ47qSsQ8LJqaCJSw k85w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784622758; x=1785227558; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mP8ESsGp3PDnVGRH0j1wFoDB1NTpcMuyoXK5rjNdngQ=; b=GR33Q6NFg3t6IGg8l5UXP4oKw/DJdNCeygR9vmiWPysIr+di4UOU++puzU8gx366Oh pUEMtGczx96T9D1T41YY9ETfuGqsf8n1r51/qr+Pxqmi7kXpH8vywrDzze2hvh9NFaUo rCyhr0D31LM8ei06d07e5Exwf/h7xzWApod2JmoCKRX0pjt5kHECaAG1fiYeYQ/iKMz3 gYSA/FBuxuQKf7mJO+5rPX8I6a0Ot1fQHNSui9uBvA3WvY3jFcKqJoAcxXhkuWKjQzAV dn7BlTbFFE6OCzCC0hrkWzMmbH8a3zN2telZUFo0qVIZCy0Wviw78g910AHgqmE+QwEt r9JQ== X-Forwarded-Encrypted: i=1; AHgh+RrWHvgF9S9HZsW9oUpFY6dVzf0a12J0zTV1H8t4TAr36w/f2b+KQs7RjCw4EhxrnOpJHF1zvomQn2/QilY=@vger.kernel.org X-Gm-Message-State: AOJu0YyjfdolFyDgOW8kUGJ8fxteP9qO1Xrn/96hT2a1qugxiZKWWKG0 MtN30pqYxI1iHIoy39fZpuBPS6qnwpMNWbWz3Yi4eFLJTSJGh24lggmIxQhgOa5oS41k7N3N+ZX SVO9bAzo= X-Gm-Gg: AfdE7clLqumbS6bYGpT54r4Pd1QdH30TV+PIkRtCXJ244ZwId6mqzIdNpNRRG84d4ZC rIljyHuzxboKVvPNpG+2FA7Qj/RDaFikcWBxZQdyQC+Rizo46Y5ktWYilu8lw3w0K6xwbh0weUf r57NrpArhNNfvDCP770tDvIak19fd7ROFgNNjqJys3u0KO99KGpPOZMRZUinB8tdumds3o26YGo LsPFPdmVeV9zSYGRu3SC/PoTYgnsLABMcYPkMcrNEP/mCgoCpDgP+qAn5OD6AYciBnMIgk0LAE8 fjINsZw1aLd5GH5Edezp3tCBAyRhwlJCtTlnkldE9WYh3HHQo6bI0fdK49RaJ52VA3z/DUuHatV ZuonCEKcIHVnkT33KFa9+MNzCfZGGiZQHFjH2c5Hkfkf4wuQfqyL535EG9Os9uo77JVdpVaTASz KrBWlfFIWfnhJ/6rPXS3FJoRXJlDkP6r9E0fOAQQpz6I8VeyHokiBpvJej9ceq3usclqjY0Rm9K DrI6A== X-Received: by 2002:a05:600c:3553:b0:495:4a33:2c34 with SMTP id 5b1f17b1804b1-4954a39955emr114409155e9.0.1784622758339; Tue, 21 Jul 2026 01:32:38 -0700 (PDT) Received: from Mac (p200300c3bf03e04c047ae254e768247a.dip0.t-ipconnect.de. [2003:c3:bf03:e04c:47a:e254:e768:247a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49548e075d4sm250421095e9.1.2026.07.21.01.32.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jul 2026 01:32:37 -0700 (PDT) From: Andreas Haufler To: "Rafael J . Wysocki" , Daniel Lezcano Cc: Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Haufler Subject: [PATCH] tools/lib/thermal: fix misplaced extern "C" closing brace Date: Tue, 21 Jul 2026 10:32:13 +0200 Message-ID: <20260721083230.91246-1-andreas@haufler.info> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- tools/lib/thermal/include/thermal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/thermal/include/thermal.h b/tools/lib/thermal/includ= e/thermal.h index 818ecdfb4..d9097271d 100644 --- a/tools/lib/thermal/include/thermal.h +++ b/tools/lib/thermal/include/thermal.h @@ -175,8 +175,8 @@ LIBTHERMAL_API thermal_error_t thermal_sampling_handle(= struct thermal_handler *t =20 LIBTHERMAL_API int thermal_sampling_fd(struct thermal_handler *th); =20 -#endif /* __LIBTHERMAL_H */ - #ifdef __cplusplus } #endif + +#endif /* __LIBTHERMAL_H */ --=20 2.50.1 (Apple Git-155)