From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 622C9C433DB for ; Sun, 28 Feb 2021 17:12:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8B1464EB7 for ; Sun, 28 Feb 2021 17:11:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8B1464EB7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0D75C8D0024; Sun, 28 Feb 2021 12:11:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 061498D0019; Sun, 28 Feb 2021 12:11:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6B4D8D0024; Sun, 28 Feb 2021 12:11:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id CB4328D0019 for ; Sun, 28 Feb 2021 12:11:58 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 99CB3824999B for ; Sun, 28 Feb 2021 17:11:58 +0000 (UTC) X-FDA: 77868319116.15.4733E91 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by imf10.hostedemail.com (Postfix) with ESMTP id CC28D4080F40 for ; Sun, 28 Feb 2021 17:11:51 +0000 (UTC) Received: by mail-ej1-f53.google.com with SMTP id ci14so4845823ejc.7 for ; Sun, 28 Feb 2021 09:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dfQ46OGWItLgoKPUR/Czwfd0qqTUSj25+jf5yrElG/4=; b=GzeA/aDB2UBhnNVhm++I/Jk3Up7Sjll8FWko6UUVrR8GbwUj6tdWvj7U7T3p1JnaWE tuDT5n8KyfWwgonEFcDAlbP9Wnm/lzI5ynLZd5zXrmZLcqy0e5qJFV+Ury6tgPUdhcIC ZnUpySrUVv3A0oExsLsVOkNej6wDTO/NVed1e1lRxfeovoJIixufVCuML3LKRgEXHaK6 AQIpA41ncR2vIctG/YIpRBR7PPh4Vs9caRlig7rCLuPUPKUXlteysI6kNYwN/3Yc//ci tD2NQsug/MYd9mQ+dWSVvw0ZV+w1YK/V6hQL8df04yN35+nWGaht76tutf0kiQ1Fxgq5 E6Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dfQ46OGWItLgoKPUR/Czwfd0qqTUSj25+jf5yrElG/4=; b=rcMdQqBQ22OU+xpC96tdI8eyfETnAXT/OwZAaRs+n1HaZSagl1A0qaHFxyPFfu8S2j YpRN06S3RXwU+PcCWV2J01xPu1fS/qCw0cMjciP10mjJ9yBBQmbJP4v1fG+anl8Hns1B wfB4GMbLJZL4azXiLUazpUEjM0vpjAWE2uiGh/zd8GuiS3wSEt3jpkJl4CQ6Px+A0Ubk 5NexCORTZCZgrtXCeW7csceVYCSaVHh9sq6SpFVTmPXcWx2Qpq6Rm7R6Z8dcc9Boox2P 63CVV/wBF0MyFr7FV7egrETOgIrcTGFPz6oWS5L1BizvmgYY9UE+SsfWO6uAbtatNWMG 9iKQ== X-Gm-Message-State: AOAM532qddGw+CIAAy+qwgtASPeePrdSItkGvN4IF77+zlZPl0Osodt4 y9hQa1TKG0ECr0hqTLwmZQ== X-Google-Smtp-Source: ABdhPJw5sLbCUCcgxkhNvC6IgO3vmNaTgOeasYPBEho60Poa4WNRXoZ/cPiXNkLCHgbgyBJUziViqw== X-Received: by 2002:a17:906:acb:: with SMTP id z11mr3855755ejf.193.1614532316774; Sun, 28 Feb 2021 09:11:56 -0800 (PST) Received: from localhost.localdomain ([46.53.249.223]) by smtp.gmail.com with ESMTPSA id fw3sm6654338ejb.82.2021.02.28.09.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Feb 2021 09:11:56 -0800 (PST) Date: Sun, 28 Feb 2021 20:11:54 +0300 From: Alexey Dobriyan To: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-arch@vger.kernel.org Subject: [PATCH 12/11] pragma once: scripted treewide conversion Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Stat-Signature: niiizdhpbjrmcnjzo9atiw1ddrwuygc9 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CC28D4080F40 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=mail-ej1-f53.google.com; client-ip=209.85.218.53 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614532311-340389 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: [ Bcc a lot of lists so that people understand what's this is all ] [ about without creating uber-cc-thread. ] [ Apologies if I missed your subsystem ] [ Please see [PATCH 11/11: pragma once: conversion script (in Python 2)] ] Hi, Linus. Please run the script below from top-level directory, it will convert most kernel headers to #pragma once directive advancing them into 21-st century. The advantages are: * less LOC 18087 files changed, 18878 insertions(+), 99804 deletions(-) = -81 kLOC (give or take) * less mental tax on developers forced to name things which aren't even real code * less junk in preprocessor hashtables and editors/IDEs autocompletion lists There are two bit exceptions: UAPI headers and ACPICA. Given ubiquity of #pragma once, I personally think even these subsystems should be converted in the future. Compile tested on alpha, arc, arm, arm64, h8300, ia64, m68k, microblaze, mips, nios2, parisc, powerpc, riscv, s390, sh, sparc, um-i386, um-x86_64, i386, x86_64, xtensa (allnoconfig, all defconfigs, allmodconfig with or without SMP/DEBUG_KERNEL + misc stuff). Not compile tested on csky, hexagon, nds32, openrisc. Love, Alexey Signed-off-by: Alexey Dobriyan #!/bin/sh -x find . -type f -name '*.h' -print |\ LC_ALL=C sort |\ sed -e 's#^./##g' |\ xargs ./scripts/pragma-once.py find . -type d -name 'uapi' | xargs git checkout -f git checkout -f arch/alpha/include/asm/cmpxchg.h git checkout -f arch/arm/mach-imx/hardware.h git checkout -f arch/arm/mach-ixp4xx/include/mach/hardware.h git checkout -f arch/arm/mach-sa1100/include/mach/hardware.h git checkout -f arch/mips/include/asm/mips-cps.h git checkout -f arch/x86/boot/boot.h git checkout -f arch/x86/boot/ctype.h git checkout -f arch/x86/include/asm/cpufeatures.h git checkout -f arch/x86/include/asm/disabled-features.h git checkout -f arch/x86/include/asm/required-features.h git checkout -f arch/x86/include/asm/vmxfeatures.h git checkout -f arch/x86/include/asm/vvar.h git checkout -f drivers/acpi/acpica/ git checkout -f drivers/gpu/drm/amd/pm/inc/vega10_ppsmc.h git checkout -f drivers/gpu/drm/amd/pm/powerplay/ppsmc.h git checkout -f drivers/input/misc/yealink.h git checkout -f drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h git checkout -f drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.h git checkout -f drivers/pcmcia/yenta_socket.h git checkout -f drivers/staging/rtl8723bs/include/hal_com_h2c.h git checkout -f include/linux/acpi.h git checkout -f include/linux/bitops.h git checkout -f include/linux/compiler_types.h git checkout -f include/linux/device.h git checkout -f include/linux/kbuild.h git checkout -f include/linux/libfdt_env.h git checkout -f include/linux/local_lock.h git checkout -f include/linux/spinlock.h git checkout -f include/linux/spinlock_api_smp.h git checkout -f include/linux/spinlock_types.h git checkout -f include/linux/tracepoint.h git checkout -f mm/gup_test.h git checkout -f net/batman-adv/main.h git checkout -f scripts/dtc/ git checkout -f tools/include/linux/bitops.h git checkout -f tools/include/linux/compiler.h git checkout -f tools/testing/selftests/clone3/clone3_selftests.h git checkout -f tools/testing/selftests/futex/include/atomic.h git checkout -f tools/testing/selftests/futex/include/futextest.h git checkout -f tools/testing/selftests/futex/include/logging.h git checkout -f tools/testing/selftests/kselftest.h git checkout -f tools/testing/selftests/kselftest_harness.h git checkout -f tools/testing/selftests/pidfd/pidfd.h git checkout -f tools/testing/selftests/x86/helpers.h