From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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 8BB3A7EA for ; Thu, 6 Oct 2022 20:33:55 +0000 (UTC) Received: by mail-qk1-f173.google.com with SMTP id y1so1786826qky.12 for ; Thu, 06 Oct 2022 13:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JNBmgmbcEhRVb5/d/O8+b1/IfZcuQKrWWyPpGBHLay8=; b=MHw3HdNkCpG1mwSCYrQqnL3L0IrPDqqPAD3ilpwGP90TMXi8pu0W5GlmDVedbtpfcK 1w/GL1Y3H0SkuA5usd7Xg9wGO/0L+otmqFDHSUU3qLcE7SAaNZSBS2aSpBCIdToIkrU1 wsJYWhugTQqfCjT+f4uwj0ZeetXJg90ORA+jnI03lh2xZA1UfMa+L5PycWsmNttuFRcc AN8FUU5HBr+uWxxbyoW+MevYuOPjs8FDFj0QyzQJVL7mi/tY5nJPHPiI4PS2y+lK+7sC zRUjczx4xMFaeTJxt37R4yeEkUUdFkybK+kaseljntR90ohTDbsNdQaH9jw5Ouv/w17y b0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JNBmgmbcEhRVb5/d/O8+b1/IfZcuQKrWWyPpGBHLay8=; b=PNPrIVJFmF0S6buGbj9FatE/baD1dH0NqCUuDxsZW6FqqrmSrS1ZXKDW6wx6tV/Cvw J/XPhR6xKRp67SmucdtKAT+FALpxELckWTCFzO4/0Oa/QEhz4hK5g6JH18siFZk53wCb cVc0rb/PjZ2378MWnIbBypq5frLa0qge8GTMnOL093Z6iC7C8k1iDGdKJ5PoNF67u2ou KEbUrte+CKDKnv0wsklfK4XkAgq7PKANX3zcURF/ONGGOghIKoJFc+22Uz8Le11HELTn T+cRd8YMlC76HSGYyDOrO5VQ2kim3vWL2fH7gwrFK/opo7fxxTGZycdoyOHT6fRp4tBI v7tA== X-Gm-Message-State: ACrzQf1oLUcOPMgbNEgn4RbHSI6qa3/wxp3xIMGxCb/yabiDwnQx2wTq 15B7Dao4xCSBXTMSSKigSoI= X-Google-Smtp-Source: AMsMyM6F4qYJwxq1tyY5ek8LBaSHy8ukK0aWx027FmAkx7naPxDDIEYwmkM+GNM1x9oufwbvzWcIAQ== X-Received: by 2002:ae9:e647:0:b0:6e6:62aa:b8d with SMTP id x7-20020ae9e647000000b006e662aa0b8dmr1536252qkl.669.1665088434395; Thu, 06 Oct 2022 13:33:54 -0700 (PDT) Received: from [192.168.1.102] (ip72-194-116-95.oc.oc.cox.net. [72.194.116.95]) by smtp.gmail.com with ESMTPSA id j24-20020ac84418000000b0034456277e3asm411191qtn.89.2022.10.06.13.33.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Oct 2022 13:33:53 -0700 (PDT) Message-ID: Date: Thu, 6 Oct 2022 13:33:50 -0700 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] include/uapi/linux/swab: Fix potentially missing __always_inline Content-Language: en-US To: Nathan Chancellor , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, =?UTF-8?Q?Petr_Van=c4=9bk?= , Nick Desaulniers , Tom Rix , Justin Stitt , Andrew Morton , Denys Vlasenko , Ingo Molnar , "open list:CLANG/LLVM BUILD SUPPORT" , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , "open list:PERFORMANCE EVENTS SUBSYSTEM" , mmayer@broadcom.com, Khem Raj , Philippe Ombredanne , Kate Stewart , Greg Kroah-Hartman , Thomas Gleixner References: <20220927215256.528619-1-f.fainelli@gmail.com> From: Florian Fainelli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Nathan, On 9/28/2022 3:36 PM, Nathan Chancellor wrote: > Hi Florian, > > On Tue, Sep 27, 2022 at 02:52:56PM -0700, Florian Fainelli wrote: >> From: Matt Redfearn >> >> Commit bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining >> of some byteswap operations") added __always_inline to swab functions >> and commit 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to >> userspace headers") added a definition of __always_inline for use in >> exported headers when the kernel's compiler.h is not available. >> >> However, since swab.h does not include stddef.h, if the header soup does >> not indirectly include it, the definition of __always_inline is missing, >> resulting in a compilation failure, which was observed compiling the >> perf tool using exported headers containing this commit: >> >> In file included from /usr/include/linux/byteorder/little_endian.h:12:0, >> from /usr/include/asm/byteorder.h:14, >> from tools/include/uapi/linux/perf_event.h:20, >> from perf.h:8, >> from builtin-bench.c:18: >> /usr/include/linux/swab.h:160:8: error: unknown type name `__always_inline' >> static __always_inline __u16 __swab16p(const __u16 *p) >> >> Fix this by replacing the inclusion of linux/compiler.h with >> linux/stddef.h to ensure that we pick up that definition if required, >> without relying on it's indirect inclusion. compiler.h is then included >> indirectly, via stddef.h. >> >> Fixes: 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers") >> Signed-off-by: Matt Redfearn >> Reviewed-by: Petr Vaněk >> Signed-off-by: Florian Fainelli > > I took this through my kernel build matrix and did not see any new > issues. > > Tested-by: Nathan Chancellor Great thanks! Since this is really useful for kernel-headers in toolchains, it would be great to get this picked up. Arnd is this something that would go via your tree? -- Florian