From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D9BA36655C for ; Fri, 7 Aug 2026 14:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786112137; cv=none; b=pWGKUBs3IxLshJ7Vs6tV9iteALiPJ6r543bzUvsDC96mL/j8y12uTlMkKLKdMjTqaCLAgT+gAksGF4Y1CB6UpSVRsXfdPRrNkQAGUl3jXnMLzi0B5zVYEuKcDUdIyYeo2gY0t52ynKtrP1H96W3RW3SyDQU9pz8xuuiTmMbT3g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786112137; c=relaxed/simple; bh=/QxAox/yuhLx/SfnR5Y6PevoCIlAq2j810Q+gZAdCGs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NSfNNi89zWJr55qfFBPl2RJv2D+cE6yAQQ1Rg49ovdtTxvwJ853APtcS19LAlbec0MQ4A6OYpMExIukTHVwkohEjUXHC18PPFn3/cEk/JbBU0iWtb4nJjtLAdLOQVGhohcKCaYGzWCrq0fUfGLUThsXcBG/QmUpXEaAg7zqGc/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=VqAjdI3+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WvHS8YHG; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="VqAjdI3+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WvHS8YHG" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 677CgHeo989351 for ; Fri, 7 Aug 2026 14:15:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= T6d7JDTDSs9JtLo2+JHJjhDzBPh6JhyXr4gi+9mpChc=; b=VqAjdI3+lkjuMtW0 KVkXrlkN7hpT5mDAVmJlTBC2dd3x+iIwn8VKrGAjeO8mJJsEpGGb/5Y/et32GkuJ ghnS7tGuRB28+dPbjCAY7g2bfUFO740/61AN3BjE8G7Dgp5OCNTdN0BMGJyeTxNV Ui1HmYs+JqooqidFCTd9oveze0YTg0xEP0djWT6txm+o7u+HvH5+yZC6CGPxBqWK prVq5j3kSS3k2ujREzdXB7uzxjbOHQk8ZvcHwLQGNwRevHj9pEt1NR0cRb9zlCWP jCogGWrVlqnkwpTSbmk0GmtPaaTNfDLPrNHKuRtNlqxr1OHBVy2KNhJkt0Axdx7U fayCOg== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fwctp91qj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 07 Aug 2026 14:15:30 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c20762d21so40546391cf.0 for ; Fri, 07 Aug 2026 07:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786112130; x=1786716930; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=T6d7JDTDSs9JtLo2+JHJjhDzBPh6JhyXr4gi+9mpChc=; b=WvHS8YHGu8965NWXc330QLP1kcNNCXmhVOm5T7HDVuaUN7xQZydf98tULkaO6wWfkp zll+3bWWdQ7kLlwn5SRymclUEKiiWvB0h7sbCLzGA4tgLqVSg+wcUOIG2sjMg5SLTpGp 4V1oxZK+Z2ssMC1JHDgYw4N7KTf/5CyPFaZsx1CZksjBwHFhiiotyvOERuYaVhO1Afg0 3zbVzGvqfjJa1ef+pCexZ4LrtXOzYakknf7Rhl1erABjzzh/HjlRaX2x0ncltt+euLCm fPKA8dq5yvw1sH3q3y5P35LAJv1XEQ17Hu2E1MUOr3rny3c+mwnzgmEG9TKPrPmODkNG t8VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786112130; x=1786716930; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T6d7JDTDSs9JtLo2+JHJjhDzBPh6JhyXr4gi+9mpChc=; b=Oad+39u/RnT9K8XfPJ1e86mSajIl1gNYsVHufv+LWg6orOnX4Oi4nsG0y4euxks97d DhqndeMnkw9pwVU8XVjx3RrMLeuVUn9KrtCUizgXo8YVm398AH0vUC6+iPTQUecmWSZh K3FahiCnNYJJP+iXKqErmbqRzSKApiMlqPiQ/0wvtk1m6jWA+qfyLNwS5ef5GP6T3hZi sb5YyE6tIVk9ftym7p5G99ThHipDnzV5SPpl4kZXIhN9VzDLHVLFG/UWYs87FNknfdbx yYvI/3Y2ffQg7THejSRWtGRuNoQj/5w7Zli5I/gBCq6wRPBud/0KN7Kvh9R6OsPHgKlf bpXQ== X-Forwarded-Encrypted: i=1; AHgh+RpmbQHfVJA9+K6gUPzjGFUxGvwcG4qjk7Tkw3Oiy97iSFvTmMn+58sYJABBjh8Rr1YvUKUlamEGZILhwjw=@vger.kernel.org X-Gm-Message-State: AOJu0Ywi/w7hRBRyxa8lh45+OLTLtVm0rmqAWR4lCPCZl55zz2VOp7BG ufhF8LIjZTGr5oAioOUxdc2csTf6xx+XRfVamLsr0r3yRtaS4gfUnJJFi6fs/f1ABq6opWuMz/e kd4hSLKL5gotsuALtX8xB1NhUINbCWZ5dWH1a+w1rkUdOSYyFapNrzCdsoI2rKnCnAgA= X-Gm-Gg: AR+sD10fanDiUbWhGe1mFhRPPaU0apgEFQpXS5wtX5QbQpu/j9WobI4+p4Q41Xf9Q0/ a6v4C+3p/vcLO/KxDVllVQziN+crhc3+mNwfiVLdQvK020ZQAQek3TQFG0ZfG9yWoz+3cfI1CTr QGAkC60bkXbraieRl6TG54IZBRRe/FnqWmnAK4bF35pFwORITwHKBpD0r4W4I9vtwGuKGccc9i9 LugQRiloGSpnjRiDDlp3rnUdBDZU0h5W5q30bVnkJ7HgGP1qvsL2gXGG9gwOpkY2pRe/YwIAoTB FIejyt6ShfioI1pfv/w3sQW+i2+pgF8CMP7QWRWCAvLiapisbl3Ji5nN/eMWLwzbr8w119mBIG8 ub+CA6sJ7IFiHx0ynDHSPEq9DHoZrValIq/yFOt78h720yg== X-Received: by 2002:a05:622a:2b05:b0:51c:15c5:2bf7 with SMTP id d75a77b69052e-52d18e6aea4mr39011431cf.12.1786112128910; Fri, 07 Aug 2026 07:15:28 -0700 (PDT) X-Received: by 2002:a05:622a:2b05:b0:51c:15c5:2bf7 with SMTP id d75a77b69052e-52d18e6aea4mr39009541cf.12.1786112128157; Fri, 07 Aug 2026 07:15:28 -0700 (PDT) Received: from [192.168.2.1] (146725694.box.freepro.com. [130.180.211.218]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-480021f8b9bsm7040072f8f.25.2026.08.07.07.15.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Aug 2026 07:15:27 -0700 (PDT) Message-ID: <04bab99c-eb54-4f03-b69a-f9f1781f30af@oss.qualcomm.com> Date: Fri, 7 Aug 2026 16:15:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tools/lib/thermal: fix misplaced extern "C" closing brace To: Andreas Haufler , "Rafael J . Wysocki" , Daniel Lezcano Cc: Zhang Rui , Lukasz Luba , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260721083230.91246-1-andreas@haufler.info> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <20260721083230.91246-1-andreas@haufler.info> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=Fp01OWrq c=1 sm=1 tr=0 ts=6a75e882 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=uw/3876vWhRnNVL35W6mqQ==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=D180SxLIAAAA:8 a=0BLcRpZjDYjvCMoZoxEA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 a=7EgOJq3TvVZn8UhVc1oe:22 X-Proofpoint-GUID: gt7PqbZU_LOBrTbinHQktTzXGmeJcMIg X-Proofpoint-ORIG-GUID: gt7PqbZU_LOBrTbinHQktTzXGmeJcMIg X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA3MDExMSBTYWx0ZWRfX6BjdeM8Phufg QXdaUyExfVKS73DtJ8+5dLL8GsfdpAMQ4NSkvWYOmRWLCKErH7IChFNe7cf+2YE2wCG6McQinue vBaVyD3rzPYx7VwPhnLUF9/jDklVHM/UMw+jRxvMrDRCCD8oMXofhEOlVtK/QN5jHkXC2FYa7+g f8axEdWB2aE1wAkd3Q8ZxTmy0Wo9DIVDsLU6uUzZqg/ZSivH1huwFRSiEsg8OxjZL49mR9whi6i ZKbKhoWYais1t+To7TW9QcwFuOOC+Eh7uoYvtDVZ2JzWOKEzUlTWzuyWEpZBBr/gOa6YT9K723b AM5GxZM65VBZAJszeGy7sUtmtqI0BcxLjCXPxWLRqzA6atIVqphpVFp6iGrxZKquLz4htLXhlLu waS9i1v8pC3vVsjk9kw4aROQrK6fQGHEBhx//jKubs9iNNvK4NGzU57vKQyuRd2Q8e3IiJgl1HD qEFM3bWyRnfBuj2O6ww== X-Proofpoint-Spam-Info: AW1haW4tMjYwODA3MDExMSBTYWx0ZWRfX3mNp1B+4cLpa aCDscnRTt8yDsXYbInRms5hkShfTkhVyaTLGyBoG2iqKsxka2c3hiiq2MbJOPsum/CIwOczFjaw KlD/qpApB3ws/3Obj09gUd1ph2CQ2/Y= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-07_02,2026-08-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 spamscore=0 clxscore=1015 adultscore=0 impostorscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608070111 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 > --- Applied, thanks for the fix