Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1123640pxv; Fri, 16 Jul 2021 02:05:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDSR7ZQd6GcSZFAUDlto5ZSHrQKIC0+aLnHcMVu0b1qG5WEHROa3i/VIGI2UHeaKkeLV7L X-Received: by 2002:a5e:d911:: with SMTP id n17mr6752615iop.178.1626426302213; Fri, 16 Jul 2021 02:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626426302; cv=none; d=google.com; s=arc-20160816; b=05sg4KRkdmrNkmh/ZRD2uG9YynLYeC1B+4kDno4ng0VOzu5nj6udmn65UI7e+x4kv1 s2w1m0m52C2NFdYFr34Q7JDGHNZush0lFYEqirzaZ6LpL3BcQeGzdBJOdsvRmQ/zYEfM xHVRFty+bzYKpjceqWfy5prOlBLiqKxQQ4GNeiGft7lq86/2YJkcxdyAa819Y/aGsZB4 7ju2cN0UeI5qnmZqcb7na8e5Us5VTpGQPGqpqqZtaFJIi1i4jTCoVww4f+mlpvk0gPiT MMfmIfHkNnLePmTtsTmT87qRsql0FcHUFSC7c3AoY6RrX2BnwtC993SRLMIVJAjGqAI2 2pmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2Dsc90xeZUKcnO2vk2cTqavYu0x9bepgHVZmQV5PiPQ=; b=H58ErbK+DyDNHlSkSOqBehR8sz2bdYuux9UeNLuiiApgw5/D3+ShdKWCf5E9JftwMc Rq1qnz3crhWAAppydyVCea/5+yA6pT6ibrPKVfY+7crj1yZ9aoH2yDx+gXGSMXFxUXZA Y7eGevDALuzKwzbWm63CS5m/DKjcvgWO/Pki7VG29I/DTvAnGKWc/OWrTbrC6quLmemZ HYmXjCbhxmPX7fl4glNx+oHYmHwNPr/JfPxS1L+wEKNhE1cWh1hKVkMIhEtpG9Hgt6Lg kS7iaXIYIk2jxEtQK8ookwiM0ZnmTUPTsT8aQkwiuCr2Q+hsJ+kNcKzgj71OTpUTzs7N v9fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wZ+JoytB; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si11753083ilf.35.2021.07.16.02.04.49; Fri, 16 Jul 2021 02:05:02 -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=@linaro.org header.s=google header.b=wZ+JoytB; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238468AbhGPJGt (ORCPT + 99 others); Fri, 16 Jul 2021 05:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbhGPJGs (ORCPT ); Fri, 16 Jul 2021 05:06:48 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71FBC061760 for ; Fri, 16 Jul 2021 02:03:53 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id c17so14035146ejk.13 for ; Fri, 16 Jul 2021 02:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2Dsc90xeZUKcnO2vk2cTqavYu0x9bepgHVZmQV5PiPQ=; b=wZ+JoytBJamwU3HH9d4e9crBzNeApXf/SsgbSaftaVoE4j6ZIRNMILUSmPfL8AV+fA R3K2LbhbYVghk1Bpz+V8gytubVn+/aNVZy/LG+hEL59TsbDu0gPtVXNFUU6NXBxUzVqC gpKsqP0ARx9bKXyFgcxIfyw2es3mxz5oeUur7zaVVhYXEAzFWt3a3/6kVZ3YLa5kP3L4 11Ht+douaXKedZl+fTOamje/cGn2/CQx2yoTYw9DzUwN8yWK6j/dj1k/r/F0x72lwOx+ 4jGCG7B5FYQ28UWjUx9CuF8wECxzuPSotMPIEcOezV4HhLnQTDBkJMRaf1T52sFt06Ni YCeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2Dsc90xeZUKcnO2vk2cTqavYu0x9bepgHVZmQV5PiPQ=; b=Y2BIk4XO+SPJEgCm0t5MZ2fKAkHk7FrQFLrYFvHgeQcSl7Yruzl+GjoBb7qP+qxrNK 7JEIqTPBI+OeK+aRHBaGov69wXQyFhn42bikLNnBeO4Ahxwphu8S2jryCkoINTGMmenM YuaS3yyELRJdZGRNAlxs2jXcVT6i1f7mTJuHBo4YkbVCoGXql4MIHQHhmiKKhdpf+Q+W wzdD/T7LHxnktjBGl58Wc5bcN1eC7zgnVN1IIgujv8ESEyLt1J9PpsoJV45/Tpsf5VP/ oEuO3j7jnXW0BbVVLskCOrHsMNqbBjKtmtwIH5ySJw9nM4agZhf5RUnQ9VkJgd+lo8Tg lglg== X-Gm-Message-State: AOAM5302LV3Pn131tEuhnm9B3kMYLOhbRuCt63MryCMJWmvL/eI2BQx4 wurblO3r5Lg+J+Ui6Dd9+yatlSTCcw3hyx0w7iVAiw== X-Received: by 2002:a17:907:3d8a:: with SMTP id he10mr10619982ejc.16.1626426232014; Fri, 16 Jul 2021 02:03:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Anders Roxell Date: Fri, 16 Jul 2021 11:03:41 +0200 Message-ID: Subject: Re: [PATCH v2] Decouple build from userspace headers To: Alexey Dobriyan Cc: Andrew Morton , Linux Kbuild mailing list , Linux Kernel Mailing List , linux-arch@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , hch@infradead.org, Linux-Next Mailing List , Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Jul 2021 at 19:45, Alexey Dobriyan wrote: > > First, userspace headers can be under incompatible license. > > Second, kernel doesn't require userspace to operate and should not > require anything from userspace to be built other than compiler. > We would use -ffreestanding too if not builtin function shenanigans. > > To decouple: > > * ship minimal stdarg.h as , > 1 type, 4 macros > > GPL 2 version of can be extracted from > http://archive.debian.org/debian/pool/main/g/gcc-4.2/gcc-4.2_4.2.4.orig.tar.gz > > * delete "-isystem" from command line arguments, > this is what enables header leakage > > * fixup/delete include directives where necessary. > > Signed-off-by: Alexey Dobriyan This patch was included into todays next tag next-20210716 and when I build an arm64 allmodconfig kernel I see the following error: # to reproduce this build locally: tuxmake --target-arch=arm64 --kconfig=allmodconfig --toolchain=gcc-11 --wrapper=none --environment=KBUILD_BUILD_TIMESTAMP=@1626414793 --environment=KBUILD_BUILD_USER=tuxmake --environment=KBUILD_BUILD_HOST=tuxmake --runtime=podman --image=docker.io/tuxmake/arm64_gcc-11 KCONFIG_ALLCONFIG=arch/arm64/configs/defconfig config default kernel modules make --silent --keep-going --jobs=32 O=/home/anders/.cache/tuxmake/builds/current KCONFIG_ALLCONFIG=arch/arm64/configs/defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- allmodconfig make --silent --keep-going --jobs=32 O=/home/anders/.cache/tuxmake/builds/current KCONFIG_ALLCONFIG=arch/arm64/configs/defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- In file included from /home/anders/src/kernel/testing/crypto/aegis128-neon-inner.c:7: /home/anders/src/kernel/testing/arch/arm64/include/asm/neon-intrinsics.h:33:10: fatal error: arm_neon.h: No such file or directory 33 | #include | ^~~~~~~~~~~~ compilation terminated. make[2]: *** [/home/anders/src/kernel/testing/scripts/Makefile.build:272: crypto/aegis128-neon-inner.o] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [/home/anders/src/kernel/testing/Makefile:1990: crypto] Error 2 make[1]: Target '__all' not remade because of errors. make: *** [Makefile:227: __sub-make] Error 2 make: Target '__all' not remade because of errors. If I revert this patch I can build it. Cheers, Anders > --- > > Makefile | 2 - > arch/arm/kernel/process.c | 2 - > arch/arm/mach-bcm/bcm_kona_smc.c | 2 - > arch/arm64/kernel/process.c | 3 -- > arch/openrisc/kernel/process.c | 2 - > arch/parisc/kernel/firmware.c | 2 - > arch/parisc/kernel/process.c | 3 -- > arch/powerpc/kernel/prom.c | 1 > arch/powerpc/kernel/prom_init.c | 2 - > arch/powerpc/kernel/rtas.c | 2 - > arch/powerpc/kernel/udbg.c | 2 - > arch/s390/boot/pgm_check_info.c | 2 - > arch/sparc/kernel/process_32.c | 3 -- > arch/sparc/kernel/process_64.c | 3 -- > arch/um/include/shared/irq_user.h | 1 > arch/um/include/shared/os.h | 1 > arch/um/os-Linux/signal.c | 2 - > arch/um/os-Linux/util.c | 1 > arch/x86/boot/boot.h | 2 - > crypto/aegis128-neon-inner.c | 2 - > drivers/block/xen-blkback/xenbus.c | 1 > drivers/firmware/efi/libstub/efi-stub-helper.c | 2 - > drivers/firmware/efi/libstub/vsprintf.c | 2 - > drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 - > drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 > drivers/gpu/drm/drm_print.c | 2 - > drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 1 > drivers/isdn/capi/capiutil.c | 2 - > drivers/macintosh/macio-adb.c | 1 > drivers/macintosh/via-cuda.c | 2 - > drivers/macintosh/via-macii.c | 2 - > drivers/macintosh/via-pmu.c | 2 - > drivers/net/wireless/intersil/orinoco/hermes.c | 1 > drivers/net/wwan/iosm/iosm_ipc_imem.h | 1 > drivers/pinctrl/aspeed/pinmux-aspeed.h | 1 > drivers/scsi/elx/efct/efct_driver.h | 1 > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/isp_local.h | 2 - > drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h | 2 - > drivers/staging/media/atomisp/pci/ia_css_env.h | 2 - > drivers/staging/media/atomisp/pci/runtime/debug/interface/ia_css_debug.h | 2 - > drivers/staging/media/atomisp/pci/sh_css_internal.h | 2 - > drivers/xen/xen-scsiback.c | 2 - > fs/befs/debug.c | 2 - > fs/reiserfs/prints.c | 2 - > fs/ufs/super.c | 2 - > include/acpi/platform/acgcc.h | 2 - > include/linux/filter.h | 2 - > include/linux/kernel.h | 2 - > include/linux/mISDNif.h | 1 > include/linux/printk.h | 2 - > include/linux/stdarg.h | 11 ++++++++++ > include/linux/string.h | 2 - > kernel/debug/kdb/kdb_support.c | 1 > lib/debug_info.c | 3 -- > lib/kasprintf.c | 2 - > lib/kunit/string-stream.h | 2 - > lib/vsprintf.c | 2 - > mm/kfence/report.c | 2 - > net/batman-adv/log.c | 2 - > sound/aoa/codecs/onyx.h | 1 > sound/aoa/codecs/tas.c | 1 > sound/core/info.c | 1 > 62 files changed, 44 insertions(+), 77 deletions(-) > > --- a/Makefile > +++ b/Makefile > @@ -978,7 +978,7 @@ KBUILD_CFLAGS += -falign-functions=64 > endif > > # arch Makefile may override CC so keep this after arch Makefile is included > -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) > +NOSTDINC_FLAGS += -nostdinc > > # warn about C99 declaration after statement > KBUILD_CFLAGS += -Wdeclaration-after-statement > --- a/arch/arm/kernel/process.c > +++ b/arch/arm/kernel/process.c > @@ -5,8 +5,6 @@ > * Copyright (C) 1996-2000 Russell King - Converted to ARM. > * Original Copyright (C) 1995 Linus Torvalds > */ > -#include > - > #include > #include > #include > --- a/arch/arm/mach-bcm/bcm_kona_smc.c > +++ b/arch/arm/mach-bcm/bcm_kona_smc.c > @@ -10,8 +10,6 @@ > * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > */ > - > -#include > #include > #include > #include > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -6,9 +6,6 @@ > * Copyright (C) 1996-2000 Russell King - Converted to ARM. > * Copyright (C) 2012 ARM Ltd. > */ > - > -#include > - > #include > #include > #include > --- a/arch/openrisc/kernel/process.c > +++ b/arch/openrisc/kernel/process.c > @@ -14,8 +14,6 @@ > */ > > #define __KERNEL_SYSCALLS__ > -#include > - > #include > #include > #include > --- a/arch/parisc/kernel/firmware.c > +++ b/arch/parisc/kernel/firmware.c > @@ -51,7 +51,7 @@ > * prumpf 991016 > */ > > -#include > +#include > > #include > #include > --- a/arch/parisc/kernel/process.c > +++ b/arch/parisc/kernel/process.c > @@ -17,9 +17,6 @@ > * Copyright (C) 2001-2014 Helge Deller > * Copyright (C) 2002 Randolph Chung > */ > - > -#include > - > #include > #include > #include > --- a/arch/powerpc/kernel/prom.c > +++ b/arch/powerpc/kernel/prom.c > @@ -11,7 +11,6 @@ > > #undef DEBUG > > -#include > #include > #include > #include > --- a/arch/powerpc/kernel/prom_init.c > +++ b/arch/powerpc/kernel/prom_init.c > @@ -14,7 +14,7 @@ > /* we cannot use FORTIFY as it brings in new symbols */ > #define __NO_FORTIFY > > -#include > +#include > #include > #include > #include > --- a/arch/powerpc/kernel/rtas.c > +++ b/arch/powerpc/kernel/rtas.c > @@ -7,7 +7,7 @@ > * Copyright (C) 2001 IBM. > */ > > -#include > +#include > #include > #include > #include > --- a/arch/powerpc/kernel/udbg.c > +++ b/arch/powerpc/kernel/udbg.c > @@ -5,7 +5,7 @@ > * c 2001 PPC 64 Team, IBM Corp > */ > > -#include > +#include > #include > #include > #include > --- a/arch/s390/boot/pgm_check_info.c > +++ b/arch/s390/boot/pgm_check_info.c > @@ -1,5 +1,6 @@ > // SPDX-License-Identifier: GPL-2.0 > #include > +#include > #include > #include > #include > @@ -8,7 +9,6 @@ > #include > #include > #include > -#include > #include "boot.h" > > const char hex_asc[] = "0123456789abcdef"; > --- a/arch/sparc/kernel/process_32.c > +++ b/arch/sparc/kernel/process_32.c > @@ -8,9 +8,6 @@ > /* > * This file handles the architecture-dependent parts of process handling.. > */ > - > -#include > - > #include > #include > #include > --- a/arch/sparc/kernel/process_64.c > +++ b/arch/sparc/kernel/process_64.c > @@ -9,9 +9,6 @@ > /* > * This file handles the architecture-dependent parts of process handling.. > */ > - > -#include > - > #include > #include > #include > --- a/arch/um/include/shared/irq_user.h > +++ b/arch/um/include/shared/irq_user.h > @@ -7,7 +7,6 @@ > #define __IRQ_USER_H__ > > #include > -#include > > enum um_irq_type { > IRQ_READ, > --- a/arch/um/include/shared/os.h > +++ b/arch/um/include/shared/os.h > @@ -8,7 +8,6 @@ > #ifndef __OS_H__ > #define __OS_H__ > > -#include > #include > #include > #include > --- a/arch/um/os-Linux/signal.c > +++ b/arch/um/os-Linux/signal.c > @@ -67,7 +67,7 @@ int signals_enabled; > #ifdef UML_CONFIG_UML_TIME_TRAVEL_SUPPORT > static int signals_blocked; > #else > -#define signals_blocked false > +#define signals_blocked 0 > #endif > static unsigned int signals_pending; > static unsigned int signals_active = 0; > --- a/arch/um/os-Linux/util.c > +++ b/arch/um/os-Linux/util.c > @@ -3,6 +3,7 @@ > * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) > */ > > +#include > #include > #include > #include > --- a/arch/x86/boot/boot.h > +++ b/arch/x86/boot/boot.h > @@ -18,7 +18,7 @@ > > #ifndef __ASSEMBLY__ > > -#include > +#include > #include > #include > #include > --- a/crypto/aegis128-neon-inner.c > +++ b/crypto/aegis128-neon-inner.c > @@ -15,8 +15,6 @@ > > #define AEGIS_BLOCK_SIZE 16 > > -#include > - > extern int aegis128_have_aes_insn; > > void *memcpy(void *dest, const void *src, size_t n); > --- a/drivers/block/xen-blkback/xenbus.c > +++ b/drivers/block/xen-blkback/xenbus.c > @@ -8,7 +8,6 @@ > > #define pr_fmt(fmt) "xen-blkback: " fmt > > -#include > #include > #include > #include > --- a/drivers/firmware/efi/libstub/efi-stub-helper.c > +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c > @@ -7,7 +7,7 @@ > * Copyright 2011 Intel Corporation; author Matt Fleming > */ > > -#include > +#include > > #include > #include > --- a/drivers/firmware/efi/libstub/vsprintf.c > +++ b/drivers/firmware/efi/libstub/vsprintf.c > @@ -10,7 +10,7 @@ > * Oh, it's a waste of space, but oh-so-yummy for debugging. > */ > > -#include > +#include > > #include > #include > --- a/drivers/gpu/drm/amd/display/dc/dc_helper.c > +++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c > @@ -28,9 +28,9 @@ > */ > > #include > +#include > > #include "dm_services.h" > -#include > > #include "dc.h" > #include "dc_dmub_srv.h" > --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h > +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h > @@ -39,7 +39,6 @@ > #include > #include > #include > -#include > > #include "atomfirmware.h" > > --- a/drivers/gpu/drm/drm_print.c > +++ b/drivers/gpu/drm/drm_print.c > @@ -25,7 +25,7 @@ > > #define DEBUG /* for pr_debug() */ > > -#include > +#include > > #include > #include > --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h > +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h > @@ -25,7 +25,6 @@ > #include > #include > #include > -#include > #include "msm_kms.h" > > #define MSM_DISP_SNAPSHOT_MAX_BLKS 10 > --- a/drivers/isdn/capi/capiutil.c > +++ b/drivers/isdn/capi/capiutil.c > @@ -379,7 +379,7 @@ static char *pnames[] = > /*2f */ "Useruserdata" > }; > > -#include > +#include > > /*-------------------------------------------------------*/ > static _cdebbuf *bufprint(_cdebbuf *cdb, char *fmt, ...) > --- a/drivers/macintosh/macio-adb.c > +++ b/drivers/macintosh/macio-adb.c > @@ -2,7 +2,6 @@ > /* > * Driver for the ADB controller in the Mac I/O (Hydra) chip. > */ > -#include > #include > #include > #include > --- a/drivers/macintosh/via-cuda.c > +++ b/drivers/macintosh/via-cuda.c > @@ -9,7 +9,7 @@ > * > * Copyright (C) 1996 Paul Mackerras. > */ > -#include > +#include > #include > #include > #include > --- a/drivers/macintosh/via-macii.c > +++ b/drivers/macintosh/via-macii.c > @@ -23,8 +23,6 @@ > * Apple's "ADB Analyzer" bus sniffer is invaluable: > * ftp://ftp.apple.com/developer/Tool_Chest/Devices_-_Hardware/Apple_Desktop_Bus/ > */ > - > -#include > #include > #include > #include > --- a/drivers/macintosh/via-pmu.c > +++ b/drivers/macintosh/via-pmu.c > @@ -18,7 +18,7 @@ > * a sleep or a freq. switch > * > */ > -#include > +#include > #include > #include > #include > --- a/drivers/net/wireless/intersil/orinoco/hermes.c > +++ b/drivers/net/wireless/intersil/orinoco/hermes.c > @@ -79,7 +79,6 @@ > > #undef HERMES_DEBUG > #ifdef HERMES_DEBUG > -#include > > #define DEBUG(lvl, stuff...) if ((lvl) <= HERMES_DEBUG) DMSG(stuff) > > --- a/drivers/net/wwan/iosm/iosm_ipc_imem.h > +++ b/drivers/net/wwan/iosm/iosm_ipc_imem.h > @@ -7,7 +7,6 @@ > #define IOSM_IPC_IMEM_H > > #include > -#include > > #include "iosm_ipc_mmio.h" > #include "iosm_ipc_pcie.h" > --- a/drivers/pinctrl/aspeed/pinmux-aspeed.h > +++ b/drivers/pinctrl/aspeed/pinmux-aspeed.h > @@ -5,7 +5,6 @@ > #define ASPEED_PINMUX_H > > #include > -#include > > /* > * The ASPEED SoCs provide typically more than 200 pins for GPIO and other > --- a/drivers/scsi/elx/efct/efct_driver.h > +++ b/drivers/scsi/elx/efct/efct_driver.h > @@ -10,7 +10,6 @@ > /*************************************************************************** > * OS specific includes > */ > -#include > #include > #include > #include > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/isp_local.h > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/isp_local.h > @@ -16,8 +16,6 @@ > #ifndef __ISP_LOCAL_H_INCLUDED__ > #define __ISP_LOCAL_H_INCLUDED__ > > -#include > - > #include "isp_global.h" > > #include > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/print_support.h > @@ -16,7 +16,7 @@ > #ifndef __PRINT_SUPPORT_H_INCLUDED__ > #define __PRINT_SUPPORT_H_INCLUDED__ > > -#include > +#include > > extern int (*sh_css_printf)(const char *fmt, va_list args); > /* depends on host supplied print function in ia_css_init() */ > --- a/drivers/staging/media/atomisp/pci/ia_css_env.h > +++ b/drivers/staging/media/atomisp/pci/ia_css_env.h > @@ -17,7 +17,7 @@ > #define __IA_CSS_ENV_H > > #include > -#include /* va_list */ > +#include /* va_list */ > #include "ia_css_types.h" > #include "ia_css_acc_types.h" > > --- a/drivers/staging/media/atomisp/pci/runtime/debug/interface/ia_css_debug.h > +++ b/drivers/staging/media/atomisp/pci/runtime/debug/interface/ia_css_debug.h > @@ -19,7 +19,7 @@ > /*! \file */ > > #include > -#include > +#include > #include "ia_css_types.h" > #include "ia_css_binary.h" > #include "ia_css_frame_public.h" > --- a/drivers/staging/media/atomisp/pci/sh_css_internal.h > +++ b/drivers/staging/media/atomisp/pci/sh_css_internal.h > @@ -20,7 +20,7 @@ > #include > #include > #include > -#include > +#include > > #if !defined(ISP2401) > #include "input_formatter.h" > --- a/drivers/xen/xen-scsiback.c > +++ b/drivers/xen/xen-scsiback.c > @@ -33,8 +33,6 @@ > > #define pr_fmt(fmt) "xen-pvscsi: " fmt > > -#include > - > #include > #include > #include > --- a/fs/befs/debug.c > +++ b/fs/befs/debug.c > @@ -14,7 +14,7 @@ > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > #ifdef __KERNEL__ > > -#include > +#include > #include > #include > #include > --- a/fs/reiserfs/prints.c > +++ b/fs/reiserfs/prints.c > @@ -8,7 +8,7 @@ > #include > #include > > -#include > +#include > > static char error_buf[1024]; > static char fmt_buf[1024]; > --- a/fs/ufs/super.c > +++ b/fs/ufs/super.c > @@ -70,7 +70,7 @@ > #include > #include > > -#include > +#include > > #include > > --- a/include/acpi/platform/acgcc.h > +++ b/include/acpi/platform/acgcc.h > @@ -22,7 +22,7 @@ typedef __builtin_va_list va_list; > #define va_arg(v, l) __builtin_va_arg(v, l) > #define va_copy(d, s) __builtin_va_copy(d, s) > #else > -#include > +#include > #endif > #endif > > --- a/include/linux/filter.h > +++ b/include/linux/filter.h > @@ -5,8 +5,6 @@ > #ifndef __LINUX_FILTER_H__ > #define __LINUX_FILTER_H__ > > -#include > - > #include > #include > #include > --- a/include/linux/kernel.h > +++ b/include/linux/kernel.h > @@ -2,7 +2,7 @@ > #ifndef _LINUX_KERNEL_H > #define _LINUX_KERNEL_H > > -#include > +#include > #include > #include > #include > --- a/include/linux/mISDNif.h > +++ b/include/linux/mISDNif.h > @@ -18,7 +18,6 @@ > #ifndef mISDNIF_H > #define mISDNIF_H > > -#include > #include > #include > #include > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -2,7 +2,7 @@ > #ifndef __KERNEL_PRINTK__ > #define __KERNEL_PRINTK__ > > -#include > +#include > #include > #include > #include > new file mode 100644 > --- /dev/null > +++ b/include/linux/stdarg.h > @@ -0,0 +1,11 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +#ifndef _LINUX_STDARG_H > +#define _LINUX_STDARG_H > + > +typedef __builtin_va_list va_list; > +#define va_start(v, l) __builtin_va_start(v, l) > +#define va_end(v) __builtin_va_end(v) > +#define va_arg(v, T) __builtin_va_arg(v, T) > +#define va_copy(d, s) __builtin_va_copy(d, s) > + > +#endif > --- a/include/linux/string.h > +++ b/include/linux/string.h > @@ -6,7 +6,7 @@ > #include /* for size_t */ > #include /* for NULL */ > #include /* for E2BIG */ > -#include > +#include > #include > > extern char *strndup_user(const char __user *, long); > --- a/kernel/debug/kdb/kdb_support.c > +++ b/kernel/debug/kdb/kdb_support.c > @@ -10,7 +10,6 @@ > * 03/02/13 added new 2.5 kallsyms > */ > > -#include > #include > #include > #include > --- a/lib/debug_info.c > +++ b/lib/debug_info.c > @@ -5,8 +5,6 @@ > * CONFIG_DEBUG_INFO_REDUCED. Please do not add actual code. However, > * adding appropriate #includes is fine. > */ > -#include > - > #include > #include > #include > @@ -22,6 +20,7 @@ > #include > #include > #include > +#include > #include > #include > #include > --- a/lib/kasprintf.c > +++ b/lib/kasprintf.c > @@ -5,7 +5,7 @@ > * Copyright (C) 1991, 1992 Linus Torvalds > */ > > -#include > +#include > #include > #include > #include > --- a/lib/kunit/string-stream.h > +++ b/lib/kunit/string-stream.h > @@ -11,7 +11,7 @@ > > #include > #include > -#include > +#include > > struct string_stream_fragment { > struct kunit *test; > --- a/lib/vsprintf.c > +++ b/lib/vsprintf.c > @@ -17,7 +17,7 @@ > * - scnprintf and vscnprintf > */ > > -#include > +#include > #include > #include > #include > --- a/mm/kfence/report.c > +++ b/mm/kfence/report.c > @@ -5,7 +5,7 @@ > * Copyright (C) 2020, Google LLC. > */ > > -#include > +#include > > #include > #include > --- a/net/batman-adv/log.c > +++ b/net/batman-adv/log.c > @@ -7,7 +7,7 @@ > #include "log.h" > #include "main.h" > > -#include > +#include > > #include "trace.h" > > --- a/sound/aoa/codecs/onyx.h > +++ b/sound/aoa/codecs/onyx.h > @@ -6,7 +6,6 @@ > */ > #ifndef __SND_AOA_CODEC_ONYX_H > #define __SND_AOA_CODEC_ONYX_H > -#include > #include > #include > #include > --- a/sound/aoa/codecs/tas.c > +++ b/sound/aoa/codecs/tas.c > @@ -58,7 +58,6 @@ > * and up to the hardware designer to not wire > * them up in some weird unusable way. > */ > -#include > #include > #include > #include > --- a/sound/core/info.c > +++ b/sound/core/info.c > @@ -16,7 +16,6 @@ > #include > #include > #include > -#include > > int snd_info_check_reserved_words(const char *str) > {