Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5955915pxv; Thu, 29 Jul 2021 02:46:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeFSNqWA7P3/ghMyd22X6AZ3cqUxZsuYEbzPt41anPjC4cRH0zQPE6ZpXimYVP/+xiekQ2 X-Received: by 2002:a05:6602:2099:: with SMTP id a25mr3408395ioa.143.1627552006116; Thu, 29 Jul 2021 02:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627552006; cv=none; d=google.com; s=arc-20160816; b=KF27kwQIXbEvUAsf0ucaFqdGJnHYU6wMsAVucR7lCPapwve4+KmL8pv5+Gb0ppi50A MEO1FIKAhwtLa0p8hpqpM5wL8bAkyqUibkTlCEfBcJoEJwJnAjMRo8dhwCZfidQCywME A2AAruCcTjX+MOZbmHMQ4QOybFwKr8IjJA4gHxukF4UjT5fzo8H8N2cHkfjZqUchCaM2 lXGoj2/E3jBrQmNaNyTz/nFRAyK8yVD2GE+O7M43IJfRIKQHXPGWOHb1rU4mf9keXOIu 2KlCsUZdEcXIT2fQJTbjUvuur0ohp8CdlfeKmm5vLHevnvma1+ezPSbInqZ5eNwaPtfU iZ/A== 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 :message-id:date:subject:to:from:dkim-signature; bh=RTIOpBIhIXba+iHfkGbk1sKd2cv7hIyyhFm84TIZ/vI=; b=oDFp/rbqFKCrcFPfaDDy/BveH6qn92DihIKh9b24GVfMLL5Iri2pvhwTSKgRBjqZkk Jte6ZqzgwTBaZbMG0gZi+cWPX2UNyq3gdCCKPHD33eB+mzr1jJGn2l96Q2NiQ9Kc8Wqv RGrBwyiCqliu0YOC/2drj/ScwSlKy10QBXJnxdm9sRhCgkqZRu85EB3zJtyPUQQqdhLV FfSmPD/MBdpB7IlpEi8LbAPM2/gIwokBobnV+lHr7AQLosAaz3c7FSeyAXRyLMuwHbYC sU7LhkPL0ClYNXhEA46g+zTECv6tq7XBXFeJnWEYMZ56hCdI1JSeBhfhAO+mn5gL8J6s cA1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=E5VNFuwl; 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 u15si3135833iot.89.2021.07.29.02.46.35; Thu, 29 Jul 2021 02:46:46 -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=E5VNFuwl; 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 S235466AbhG2Jpl (ORCPT + 99 others); Thu, 29 Jul 2021 05:45:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235019AbhG2Jpk (ORCPT ); Thu, 29 Jul 2021 05:45:40 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CE35C061757 for ; Thu, 29 Jul 2021 02:45:37 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id x11so8717069ejj.8 for ; Thu, 29 Jul 2021 02:45:37 -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:mime-version :content-transfer-encoding; bh=RTIOpBIhIXba+iHfkGbk1sKd2cv7hIyyhFm84TIZ/vI=; b=E5VNFuwlnm/hWZNfsaxVOYyRAJh/Bebb2DIBdcB97U3Jc3u+7UWGojn9MGliXc51d5 jFgRckSFdVEMJQkiKmlPNPc0Jcf1jWjNe7T9Cgascuos87PQydPjpztoiOwy2GIJDadM pLf6O4tetR3/th6ahlw7zeWLI6uAhPIn1EMXx+KaEPKOoEUhbGmvqM4bMniaiLWY97aF hNkLbi2YqPYlwg6wdwxxtC1jxf+Y4ZNLN/Y0tws5qXhQRxz0wPbkPxDqgs4ddEWIiIlk 0FM0io5HIT+sdoD4ZQS1WzoR79lmxGSuOppkgfA0rGDk69shCyk44L/e+AMX5RdVAVeT a+Uw== 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:mime-version :content-transfer-encoding; bh=RTIOpBIhIXba+iHfkGbk1sKd2cv7hIyyhFm84TIZ/vI=; b=DXyThN3uYNCxO35/oCWYW5J6JHeYVPIfdf19VrmZWZ/BFfj1CvYGDHAmCAmU8ymW1A StTjJxcz7xH1WNQcv7bd8Hms5qnzw54lbF/67G9CNRfVYGKABpKCsbLDphc3FoEBQtzw UhpMCvliY42wo2rxGJmAwvTOedDZpxMtfb10PMt9MvvrM17t6s7MAcS/iR67lJYqEyPi ogqo3Et5R7l4ZO2T6Gac2Ce+pbNDhJ+wx77FkyOWj3DP4e2iJOOo8SgWx8/WN64IJyfg UjGvvjjehbZR8uQSFkRtqd5x4Sv603o8eJnITz3RN+zzR4gBkI7WcE835kHmbUCR/qy4 ma6Q== X-Gm-Message-State: AOAM532oel/3qvNdF7XySq3TvPZrNuxG11YauiYCuKWPiZUEg8KD8SE5 M5y9lcyG/ZzMxwa0bRLZjSDaiw== X-Received: by 2002:a17:906:cc57:: with SMTP id mm23mr3665043ejb.12.1627551936120; Thu, 29 Jul 2021 02:45:36 -0700 (PDT) Received: from localhost.localdomain ([89.18.44.40]) by smtp.gmail.com with ESMTPSA id b15sm774965ejv.15.2021.07.29.02.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jul 2021 02:45:35 -0700 (PDT) From: Pavo Banicevic To: arkamar@atlas.cz, matt.redfearn@mips.com, mingo@kernel.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH] include/uapi/linux/swab: Fix potentially missing __always_inline Date: Thu, 29 Jul 2021 11:45:58 +0200 Message-Id: <20210729094558.5935-1-pavo.banicevic@sartura.hr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Reviewed-by: Petr Vaněk --- Resending as patch is not really related to previous series and to not wait long for the merge. --- 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