Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4433801pxv; Tue, 27 Jul 2021 07:17:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWVq4CJJII+4WXiPAHAIRPkooyHEHf/40hYl58xmGKlUd6dNAbkYJnlEpT0N4WCWgqbwbl X-Received: by 2002:aa7:cd96:: with SMTP id x22mr28714015edv.102.1627395433814; Tue, 27 Jul 2021 07:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627395433; cv=none; d=google.com; s=arc-20160816; b=eyrZhaBAAg4qYPb7PnguyMkuTCs7pErpclne3AKt8QMt3BBqj/e2+RppVDT3DHNxyn O1q0bfcF28spo4UDx0EjMNuFF97LW6WGs1xofR0a19T6/r4JMrq+rTHrcE7KRyFURmjy gBtUuma4Hi7jC6iBri4Bko6A6ur6UQ8nG4Jtr4BK33iZqHDzw+px8gKgrl4dJwjju2cG qxxbhIOtdEbW9ga2Eh5luolpM7RzMJll0MJk8IDzeR93OgYZLYivkWwVBkIeGN6GCx8q I48doJS7G0CNX/DGCunuBmquBXO/RnoDS3jw8Vr+lJZYno0X8xoQgRFoynfWivKINxxy kJNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qwa+xoI2CDwZCXWoP75fryBIWWQhf6+Djvh21ehxk/s=; b=HpfZqRujzTFI38Wp+uyNsFW9VHSM2d4tA7Rp1D8K7MlVApbwB2Swx1D9Pttv1rxDUk KIUUP3sd+t50yUvwJRZT72gebAm3kLHnhJ6JEFGJmvqTgYq0IPYGmwUd7N57iFiPtf+c s+n3XExNC+xI23jZfh3DAUhzFF6OISCtRRN1WFgzcPW6gMI0tcb87ZtYItVzqkPkv4Hp YVMNr2cFUBCMjms6tBjEs7ROtUWHTmPmTek0kqcj3A62tt70F2B8gaCSMqOD3/wnxkx5 /CFlrVcLdv/pdaBXp1BViOHSapQMk8olFk7NdSsAMBdsf7xnQ8Lm/xwhCcDfA55v9Qmk C7Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=B5jXowo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op26si3680631ejb.721.2021.07.27.07.16.50; Tue, 27 Jul 2021 07:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=B5jXowo1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236764AbhG0ONC (ORCPT + 99 others); Tue, 27 Jul 2021 10:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236901AbhG0ONB (ORCPT ); Tue, 27 Jul 2021 10:13:01 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CE69C0613D3 for ; Tue, 27 Jul 2021 07:12:59 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id e2so15397118wrq.6 for ; Tue, 27 Jul 2021 07:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qwa+xoI2CDwZCXWoP75fryBIWWQhf6+Djvh21ehxk/s=; b=B5jXowo1MEKTQwzw6BcXm2W96amte5w/etnTWTcj6Zhl7tbiWTGNZQDVHrKndwOIQd JesYaR1CcQVQDiIcW1jlMeXN5G2j2Y861g/NwtI6DjmDcSpjawN15OxaMT+oqiHWAIwV 7fSjkk3bx6ozMc1cSxtAlee+QQsesEunnstoczGzOY1AMHUq49gC/Esv8OKObPSYftQ6 cjzH2V86ZG84eWJSC0HzmdysWlqYr/8k9TL+ecOS944FJ0jM4WrQF9rcDK95Wps/vSzN AeU2kwI0NHufhBINRSXL0Xca68p8IBl3Wjw3U9KEwUmNBR45xs5X/48QoKGZPtdhbOU8 ndRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qwa+xoI2CDwZCXWoP75fryBIWWQhf6+Djvh21ehxk/s=; b=N8Gm2EKuRhrfdD/5NZlukpvpitQd4lhFzyAS1S090yd4GFAFmxd34d/Pog58wcHbKW Aen+Lbh6KTGkOzac+V9vkkD2Yu/7DRacbMDCVt7F3XsDn1MqRcLHqhzPeEQZFPm6IbZV CQrReC7Iv3o6ceuDzNwaUCF0Avi0iucIxpdinBHfA7TZPlmlMFNbA0TKqj8ZDCasmIRU Ed32xkLz2iQZodxR7kNmx/vcLkgNAQh/WzK1McGr6TISOJkBjkRl7yjS5jwK92oHTrTY VAAIFx4WYjaVw+IQD/qcsUnsFeck/+1/ePZkaZw3CnceDjHj1qNbOszMgJIYxZZIY6u6 NYQQ== X-Gm-Message-State: AOAM532SO6/9tgJi+WL5HrrhgG2mcGeOo1nHCX4GzqIvEItVIjMq5g1c W9Yi4wKANRmHqAxrUqgvN4ko1Q== X-Received: by 2002:a05:6000:1b02:: with SMTP id f2mr20915877wrz.274.1627395177949; Tue, 27 Jul 2021 07:12:57 -0700 (PDT) Received: from localhost.localdomain ([89.18.44.40]) by smtp.gmail.com with ESMTPSA id t1sm3403912wrm.42.2021.07.27.07.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 07:12:57 -0700 (PDT) From: Pavo Banicevic To: linux@armlinux.org.uk, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, nathan@kernel.org, ndesaulniers@google.com, ivan.khoronzhuk@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, matt.redfearn@mips.com, mingo@kernel.org, dvlasenk@redhat.com, juraj.vijtiuk@sartura.hr, robert.marko@sartura.hr, luka.perkov@sartura.hr, jakov.petrina@sartura.hr Subject: [PATCH 3/3] include/uapi/linux/swab: Fix potentially missing __always_inline Date: Tue, 27 Jul 2021 16:11:19 +0200 Message-Id: <20210727141119.19812-4-pavo.banicevic@sartura.hr> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210727141119.19812-1-pavo.banicevic@sartura.hr> References: <20210727141119.19812-1-pavo.banicevic@sartura.hr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/uapi/linux/swab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h index 7272f85d6d6a..3736f2fe1541 100644 --- a/include/uapi/linux/swab.h +++ b/include/uapi/linux/swab.h @@ -3,7 +3,7 @@ #define _UAPI_LINUX_SWAB_H #include -#include +#include #include #include -- 2.32.0