Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2872462rwi; Fri, 28 Oct 2022 12:25:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4namK66+XctFhE92nVB0LQOcr8P38RyWzKx9CbaaBx2/UDl2ISAyxafQvYRkWIaEos/5Wk X-Received: by 2002:a17:907:2cf1:b0:78d:cafc:caba with SMTP id hz17-20020a1709072cf100b0078dcafccabamr830142ejc.154.1666985137546; Fri, 28 Oct 2022 12:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666985137; cv=none; d=google.com; s=arc-20160816; b=aC1e/qs+2Upr2UFmnYOlIOK7TM7xjxHvF2XmONaCiPfK+GQseev0AiNgW9Y1Uwzt9d +Kwx01AoLheJU4i/eR2rsV47YZXhzuAE7R6m8u3/877n0BynEHTpUFeI8+D0MOosEjM3 Q7PLoE85NGFEI1tbf/8oTnj80gKR9EToVr0T3XUUZ6vNnm+rJqpSM97a6CWQfk5TGXdY zHt/nQtXdLRBanZ032tAk/XR0HgQUKwPYftNYngvGPZ4ZuZjkT/bKr1ONDtwwQrwYYxy 1PTa4OhGbitWLHd+3Q12r1mJCD01sA723LC0hQNkW5SA15vqfOcM98l5ijoblepZVuim uSGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=XFtzDp1GmCsTv7CuMlTyHutAb+I5WP7vletAv2HWDNc=; b=i6pybjoSubmTGMLmFrFO2ISRhdPg+pDU173CoutpclrQ2m1UHJeqM8PqIQYsy755hr 6pOjmHx9LR3tgXV8SVqwY7TWEYIuaMBGBJ86TUbBjXiNj95LN4Rk3VoODfsM0DvpOX9L 5sbDf36OY7xu4N9N1GZt7Gr4q/f8cTdDXhQGIgWlIgRDSbH1CDhD0eg/zswLQDQxVfwy lKDCWroLxHyh8tfjI3ILk9495VZ3gPcc63HTyBFEVD4pw1BpAnq2s72nrCnoZphi4QCh YZ3GYe5XgN6F0oxlhSh1ytI4UxCtw421qECMZl/AojK4YBZLqh6oJ5ACrPunzsmfI5jf oSkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EpEDr6Ey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch25-20020a170906c2d900b00771d781fb88si4062635ejb.411.2022.10.28.12.25.11; Fri, 28 Oct 2022 12:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EpEDr6Ey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbiJ1TUI (ORCPT + 99 others); Fri, 28 Oct 2022 15:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiJ1TUE (ORCPT ); Fri, 28 Oct 2022 15:20:04 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E3F6C07; Fri, 28 Oct 2022 12:20:02 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id o28so1440018qkl.4; Fri, 28 Oct 2022 12:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XFtzDp1GmCsTv7CuMlTyHutAb+I5WP7vletAv2HWDNc=; b=EpEDr6Ey6WfAXuzpa4OZrcb2T5JyYMgqDvYRgnKe5QjROwWYyUDbl5XL7UlTlCcDOT ubcIGNK3xYa5pgURVJ2ur1lrulnFssCwYhEdSCD19ATc3tTjyVlXvDYpvhfLkuTiUfn5 adqbdblIMRG+vdv/YyDzV2QQ8HztVP+GivJX74mcUgy+x7QuCIgdQoijWes81oaDJvBZ PubF0EXcWPu1FMzYm4uMb+niofLQ4VX/er0acUiMZjhmQLktTYPxaIVpZU9R4HEyo//T 4wMU9Q3XB/w5dIpMiFGjy2w4NL0412VmuQIsNhapKJSh1Vyci7MkT5F5aJ7ghGZ78bFq wJUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XFtzDp1GmCsTv7CuMlTyHutAb+I5WP7vletAv2HWDNc=; b=KYIjNDk+D+gwcVjP+tDoZ2NH3xbGLL4UKp1A7kQdYlHlOLa7RI+nBpCDwOHy3JD8fP vPWWX+ECoYdWr0tMNJWnBebXdFxvhjkxctaNRmlveiFlFuMw+vNaZjbjeByiN8CQZBpw 5GC2pIaGUM2OoTlwwPf/cuWfy4pyd4tjzqCx3PSpMrc5OAfR3Vw0IAVpB/Pt39WYiIY1 yp5WwIGk2WSqUm4a/UGywlQZCg4OF+4qV6txq6WxSBiw0uwCq/ZXx5+NGbYMa7FbHzzQ AVpYrjw1OwTBzCVhvY1s0eRXi+o9RYgwinITIdqjQ2qfGujUShc5oEzQLI2cLTh/GizR cr3w== X-Gm-Message-State: ACrzQf0jSaHqwSa/O0Q5VhIdF+JdN9Hi1sv12nR5PQMqyAhNKNL+bLVr aj4KK3denjpjQVaXInFBeZB7cHVC/r4dmw== X-Received: by 2002:a05:620a:2601:b0:6bc:70bb:c56b with SMTP id z1-20020a05620a260100b006bc70bbc56bmr665970qko.416.1666984801430; Fri, 28 Oct 2022 12:20:01 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id d20-20020ac851d4000000b00399fe4aac3esm2783285qtn.50.2022.10.28.12.19.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 12:20:00 -0700 (PDT) Message-ID: <28a8fccb-508c-7a49-a79a-5167da8fba81@gmail.com> Date: Fri, 28 Oct 2022 12:19:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] include/uapi/linux/swab: Fix potentially missing __always_inline Content-Language: en-US From: Florian Fainelli 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/22 13:33, Florian Fainelli wrote: > 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? Arnd, is this a patch you can merge? Thanks -- Florian