Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp350258pxu; Thu, 7 Jan 2021 06:42:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxE95t8kRbTmUeHdwBqeZwesYvawiRxM9DSlkooQq8vIu54KWrDYU9BsymgIhKmJ4yxaxD9 X-Received: by 2002:a50:ec18:: with SMTP id g24mr1911335edr.6.1610030520782; Thu, 07 Jan 2021 06:42:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610030520; cv=none; d=google.com; s=arc-20160816; b=IvBjHshVlMDBV0zEnaqFnQFPgsM05UAz4WzZ16/9ymXvFPQzf0bO0tJiQjsRF4iqd0 OGKD3RJsvLJ7onZnRvMUl4bxoE1ZqF/1X7RVt1wEbGCMpLeYYg7wlg9d2qrAVYwHMdSF 1IqxoFxrIzp6RWvLFQE8bvSO/rzI27CRgc55b+hcY8DEGfCeegTEq7m5DRwfWjMRxrdI l7F1kE9cLKokmGlYWTECUMuJcpjzkPz70tz3lj56rJwsEXYKgDQptB3NJVO1han3EDcs fzPi5XZSa8a7bUZqkFhqE7LsnpIqnDLocS13Z9W5+ycLXEvzBJMRjl9PKVqIjtaCaVK1 teRw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tN4D4vR6SMGwL+pnmUhaa4Di/liyVZqXQc/RExktup0=; b=heWfNTq2Xh8VwrI/ogZwuXFe1YkNCOr9ljEY+k5s5MRVpyifyugjrKi106WNoJI3xs VFFXJp/NWf7naCs1ArmFS6Py2EgS05Ui2lX6oLVMDB8YjV6wX7MpRqpwLVJzknVQW9s+ aW2ellPRQq6ZoIU9iu09RajKkrhk5fFtWLFMXLPd78DSFNzeLLkHy6DtbjQRp2rSCnJn 1kYUEdMCELSDbVZPVjwyf+5aE+ezGMNZPNWn2GAoF/19C0Csc18qjyhKFI7OaB59XASZ nMG0MXhx/+U51zVovNmSujyUElYYSPS2sXL9p4MNPEQL209CWr62rAcMrovhlwnO3/25 GsDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Suh002im; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si2219342ejg.723.2021.01.07.06.41.37; Thu, 07 Jan 2021 06:42:00 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=Suh002im; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728860AbhAGObh (ORCPT + 99 others); Thu, 7 Jan 2021 09:31:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:45562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728630AbhAGObg (ORCPT ); Thu, 7 Jan 2021 09:31:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5326623358; Thu, 7 Jan 2021 14:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610029840; bh=SaG+crkRcZiiauzcbyJ1e95h1sh9V8uN+afl6o7MiEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Suh002imjVwcoGpl/inz3CVCMEoz6mcPjjPcP1YODSCXZjQIFg4twq08jaYIMDjDb cnJxGKmI/W8RUpPBncdcQwlOwK3QBJ3FcWaRL525RcTQJ11FQHdmMNg7P31TowTTKI 8jNKH+uh1D8FZIvdWCMqVuyg3rp4iEaON0k+88CU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Vorel , Rich Felker , Rich Felker , Peter Korsgaard , Baruch Siach , Florian Weimer , Andrew Morton , Linus Torvalds Subject: [PATCH 4.14 13/29] uapi: move constants from to Date: Thu, 7 Jan 2021 15:31:28 +0100 Message-Id: <20210107143054.812122562@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107143052.973437064@linuxfoundation.org> References: <20210107143052.973437064@linuxfoundation.org> User-Agent: quilt/0.66 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: Petr Vorel commit a85cbe6159ffc973e5702f70a3bd5185f8f3c38d upstream. and include in UAPI headers instead of . The reason is to avoid indirect include when using some network headers: or others -> -> . This indirect include causes on MUSL redefinition of struct sysinfo when included both and some of UAPI headers: In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5, from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5, from ../include/tst_netlink.h:14, from tst_crypto.c:13: x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of `struct sysinfo' struct sysinfo { ^~~~~~~ In file included from ../include/tst_safe_macros.h:15, from ../include/tst_test.h:93, from tst_crypto.c:11: x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com Signed-off-by: Petr Vorel Suggested-by: Rich Felker Acked-by: Rich Felker Cc: Peter Korsgaard Cc: Baruch Siach Cc: Florian Weimer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/const.h | 5 +++++ include/uapi/linux/ethtool.h | 2 +- include/uapi/linux/kernel.h | 9 +-------- include/uapi/linux/lightnvm.h | 2 +- include/uapi/linux/mroute6.h | 2 +- include/uapi/linux/netfilter/x_tables.h | 2 +- include/uapi/linux/netlink.h | 2 +- include/uapi/linux/sysctl.h | 2 +- 8 files changed, 12 insertions(+), 14 deletions(-) --- a/include/uapi/linux/const.h +++ b/include/uapi/linux/const.h @@ -25,4 +25,9 @@ #define _BITUL(x) (_AC(1,UL) << (x)) #define _BITULL(x) (_AC(1,ULL) << (x)) +#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) +#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) + +#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + #endif /* !(_LINUX_CONST_H) */ --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -14,7 +14,7 @@ #ifndef _UAPI_LINUX_ETHTOOL_H #define _UAPI_LINUX_ETHTOOL_H -#include +#include #include #include --- a/include/uapi/linux/kernel.h +++ b/include/uapi/linux/kernel.h @@ -3,13 +3,6 @@ #define _UAPI_LINUX_KERNEL_H #include - -/* - * 'kernel.h' contains some often-used function prototypes etc - */ -#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) -#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) - -#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) +#include #endif /* _UAPI_LINUX_KERNEL_H */ --- a/include/uapi/linux/lightnvm.h +++ b/include/uapi/linux/lightnvm.h @@ -21,7 +21,7 @@ #define _UAPI_LINUX_LIGHTNVM_H #ifdef __KERNEL__ -#include +#include #include #else /* __KERNEL__ */ #include --- a/include/uapi/linux/mroute6.h +++ b/include/uapi/linux/mroute6.h @@ -2,7 +2,7 @@ #ifndef _UAPI__LINUX_MROUTE6_H #define _UAPI__LINUX_MROUTE6_H -#include +#include #include #include #include /* For struct sockaddr_in6. */ --- a/include/uapi/linux/netfilter/x_tables.h +++ b/include/uapi/linux/netfilter/x_tables.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI_X_TABLES_H #define _UAPI_X_TABLES_H -#include +#include #include #define XT_FUNCTION_MAXNAMELEN 30 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h @@ -2,7 +2,7 @@ #ifndef _UAPI__LINUX_NETLINK_H #define _UAPI__LINUX_NETLINK_H -#include +#include #include /* for __kernel_sa_family_t */ #include --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h @@ -23,7 +23,7 @@ #ifndef _UAPI_LINUX_SYSCTL_H #define _UAPI_LINUX_SYSCTL_H -#include +#include #include #include