From: "Darrick J. Wong" <djwong@kernel.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH 12/11] pragma once: scripted treewide conversion
Date: Mon, 1 Mar 2021 09:35:25 -0800 [thread overview]
Message-ID: <20210301173525.GF7272@magnolia> (raw)
In-Reply-To: <YDvO2kmidKZaK26j@localhost.localdomain>
On Sun, Feb 28, 2021 at 08:11:54PM +0300, Alexey Dobriyan wrote:
> [ 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
I don't find include guards to be much of a mental tax, but it sure
would be nice to see exactly what the changes would look like...
> * 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 <adobriyan@gmail.com>
>
>
>
> #!/bin/sh -x
> find . -type f -name '*.h' -print |\
> LC_ALL=C sort |\
> sed -e 's#^./##g' |\
> xargs ./scripts/pragma-once.py
...because I can't find this script in upstream git, so I can't really
tell for myself what the changes to xfs would look like. The thing I
need to know is, what will changes to fs/xfs/libxfs/ look like when we
port that to userspace?
Does this introduce any minimum compiler version requirements?
--D
>
> 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
next prev parent reply other threads:[~2021-03-02 0:58 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-28 16:57 [PATCH 00/11] pragma once: " Alexey Dobriyan
2021-02-28 16:58 ` [PATCH 01/11] pragma once: delete include/linux/atm_suni.h Alexey Dobriyan
2021-02-28 19:05 ` Jakub Kicinski
2021-02-28 16:59 ` [PATCH 02/11] pragma once: convert arch/arm/tools/gen-mach-types Alexey Dobriyan
2021-03-01 10:19 ` Russell King - ARM Linux admin
2021-03-02 15:15 ` Alexey Dobriyan
2021-02-28 16:59 ` [PATCH 03/11] pragma once: convert arch/s390/tools/gen_facilities.c Alexey Dobriyan
2021-02-28 17:00 ` [PATCH 04/11] pragma once: convert drivers/gpu/drm/pl111/pl111_nomadik.h Alexey Dobriyan
2021-03-01 14:41 ` Linus Walleij
2021-02-28 17:01 ` [PATCH 05/11] pragma once: convert drivers/scsi/qla2xxx/qla_target.h Alexey Dobriyan
2021-02-28 22:07 ` Bart Van Assche
2021-02-28 17:02 ` [PATCH 06/11] pragma once: convert include/linux/cb710.h Alexey Dobriyan
2021-03-03 23:13 ` Michał Mirosław
2021-02-28 17:02 ` [PATCH 07/11] pragma once: convert kernel/time/timeconst.bc Alexey Dobriyan
2021-02-28 17:03 ` [PATCH 08/11] pragma once: convert scripts/atomic/ Alexey Dobriyan
2021-03-01 7:55 ` Peter Zijlstra
2021-02-28 17:04 ` [PATCH 09/11] pragma once: convert scripts/selinux/genheaders/genheaders.c Alexey Dobriyan
2021-02-28 18:37 ` Paul Moore
2021-02-28 18:57 ` Alexey Dobriyan
2021-02-28 17:05 ` [PATCH 10/11] pragma once: delete few backslashes Alexey Dobriyan
2021-03-01 8:54 ` Ido Schimmel
2021-03-02 19:00 ` Vineet Gupta
2021-03-04 14:22 ` Edward Cree
2021-03-23 10:09 ` Pavel Machek
2021-02-28 17:05 ` [PATCH 11/11] pragma once: conversion script (in Python 2) Alexey Dobriyan
2021-02-28 17:11 ` [PATCH 12/11] pragma once: scripted treewide conversion Alexey Dobriyan
2021-03-01 17:35 ` Darrick J. Wong [this message]
2021-02-28 17:46 ` [PATCH 00/11] pragma once: " Linus Torvalds
2021-02-28 19:34 ` Alexey Dobriyan
2021-02-28 20:00 ` Linus Torvalds
[not found] ` <877dmo10m3.fsf@tromey.com>
2021-03-03 20:17 ` Linus Torvalds
2021-03-04 13:55 ` David Laight
2021-03-04 20:16 ` Linus Torvalds
2021-03-05 9:19 ` David Laight
2021-03-05 21:23 ` Linus Torvalds
2021-03-06 13:07 ` Miguel Ojeda
2021-03-06 21:33 ` Linus Torvalds
2021-03-23 10:03 ` Pavel Machek
2021-03-01 0:29 ` Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210301173525.GF7272@magnolia \
--to=djwong@kernel.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®