* [PATCH 01/11] pragma once: delete include/linux/atm_suni.h [not found] <YDvLYzsGu+l1pQ2y@localhost.localdomain> @ 2021-02-28 16:58 ` Alexey Dobriyan 2021-02-28 19:05 ` Jakub Kicinski 2021-02-28 17:05 ` [PATCH 10/11] pragma once: delete few backslashes Alexey Dobriyan 2021-02-28 17:11 ` [PATCH 12/11] pragma once: scripted treewide conversion Alexey Dobriyan 2 siblings, 1 reply; 8+ messages in thread From: Alexey Dobriyan @ 2021-02-28 16:58 UTC (permalink / raw) To: torvalds; +Cc: linux-kernel, akpm, 3chas3, linux-atm-general, netdev From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan <adobriyan@gmail.com> Date: Wed, 10 Feb 2021 21:07:45 +0300 Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h This file has been empty since 2.3.99-pre3! Delete it instead of converting to #pragma once. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> --- drivers/atm/fore200e.c | 1 - drivers/atm/suni.c | 1 - include/linux/atm_suni.h | 12 ------------ 3 files changed, 14 deletions(-) delete mode 100644 include/linux/atm_suni.h diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 9a70bee84125..0b9c99c3d218 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -21,7 +21,6 @@ #include <linux/module.h> #include <linux/atmdev.h> #include <linux/sonet.h> -#include <linux/atm_suni.h> #include <linux/dma-mapping.h> #include <linux/delay.h> #include <linux/firmware.h> diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c index c920a8c52925..21e5acc766b8 100644 --- a/drivers/atm/suni.c +++ b/drivers/atm/suni.c @@ -21,7 +21,6 @@ #include <linux/timer.h> #include <linux/init.h> #include <linux/capability.h> -#include <linux/atm_suni.h> #include <linux/slab.h> #include <asm/param.h> #include <linux/uaccess.h> diff --git a/include/linux/atm_suni.h b/include/linux/atm_suni.h deleted file mode 100644 index 84f3aab54468..000000000000 --- a/include/linux/atm_suni.h +++ /dev/null @@ -1,12 +0,0 @@ -/* atm_suni.h - Driver-specific declarations of the SUNI driver (for use by - driver-specific utilities) */ - -/* Written 1998,2000 by Werner Almesberger, EPFL ICA */ - - -#ifndef LINUX_ATM_SUNI_H -#define LINUX_ATM_SUNI_H - -/* everything obsoleted */ - -#endif -- 2.29.2 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h 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 0 siblings, 0 replies; 8+ messages in thread From: Jakub Kicinski @ 2021-02-28 19:05 UTC (permalink / raw) To: Alexey Dobriyan Cc: torvalds, linux-kernel, akpm, 3chas3, linux-atm-general, netdev On Sun, 28 Feb 2021 19:58:17 +0300 Alexey Dobriyan wrote: > From c17ac63e1334c742686cd411736699c1d34d45a7 Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan <adobriyan@gmail.com> > Date: Wed, 10 Feb 2021 21:07:45 +0300 > Subject: [PATCH 01/11] pragma once: delete include/linux/atm_suni.h > > This file has been empty since 2.3.99-pre3! > Delete it instead of converting to #pragma once. > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> I'm guessing you want this to be merged via the networking tree? (Guessing since you didn't CC us on the cover letter). In that case please wait a couple of days and re-post it as a standalone patch to netdev. Our build & validation bots can't deal with series where we only get patches 1 and 10 on the list. If someone else is willing to merge the entire series - consider this patch acked. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 10/11] pragma once: delete few backslashes [not found] <YDvLYzsGu+l1pQ2y@localhost.localdomain> 2021-02-28 16:58 ` [PATCH 01/11] pragma once: delete include/linux/atm_suni.h Alexey Dobriyan @ 2021-02-28 17:05 ` Alexey Dobriyan 2021-03-01 8:54 ` Ido Schimmel ` (2 more replies) 2021-02-28 17:11 ` [PATCH 12/11] pragma once: scripted treewide conversion Alexey Dobriyan 2 siblings, 3 replies; 8+ messages in thread From: Alexey Dobriyan @ 2021-02-28 17:05 UTC (permalink / raw) To: torvalds Cc: linux-kernel, akpm, vgupta, linux-snps-arc, jiri, idosch, netdev, Jason, mchehab From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan <adobriyan@gmail.com> Date: Fri, 19 Feb 2021 13:37:24 +0300 Subject: [PATCH 10/11] pragma once: delete few backslashes Some macros contain one backslash too many and end up being the last macro in a header file. When #pragma once conversion script truncates the last #endif and whitespace before it, such backslash triggers a warning about "OMG file ends up in a backslash-newline". Needless to say I don't want to handle another case in my script, so delete useless backslashes instead. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> --- arch/arc/include/asm/cacheflush.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/item.h | 2 +- include/linux/once.h | 2 +- include/media/drv-intf/exynos-fimc.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arc/include/asm/cacheflush.h b/arch/arc/include/asm/cacheflush.h index e201b4b1655a..46704c341b17 100644 --- a/arch/arc/include/asm/cacheflush.h +++ b/arch/arc/include/asm/cacheflush.h @@ -112,6 +112,6 @@ do { \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - memcpy(dst, src, len); \ + memcpy(dst, src, len) #endif diff --git a/drivers/net/ethernet/mellanox/mlxsw/item.h b/drivers/net/ethernet/mellanox/mlxsw/item.h index e92cadc98128..cc0133401dd1 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/item.h +++ b/drivers/net/ethernet/mellanox/mlxsw/item.h @@ -504,6 +504,6 @@ mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \ return __mlxsw_item_bit_array_set(buf, \ &__ITEM_NAME(_type, _cname, _iname), \ index, val); \ -} \ +} #endif diff --git a/include/linux/once.h b/include/linux/once.h index 9225ee6d96c7..0af450ff94a5 100644 --- a/include/linux/once.h +++ b/include/linux/once.h @@ -55,6 +55,6 @@ void __do_once_done(bool *done, struct static_key_true *once_key, #define get_random_once(buf, nbytes) \ DO_ONCE(get_random_bytes, (buf), (nbytes)) #define get_random_once_wait(buf, nbytes) \ - DO_ONCE(get_random_bytes_wait, (buf), (nbytes)) \ + DO_ONCE(get_random_bytes_wait, (buf), (nbytes)) #endif /* _LINUX_ONCE_H */ diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h index 6b9ef631d6bb..6c5fbdacf4b5 100644 --- a/include/media/drv-intf/exynos-fimc.h +++ b/include/media/drv-intf/exynos-fimc.h @@ -152,6 +152,6 @@ static inline struct exynos_video_entity *vdev_to_exynos_video_entity( #define fimc_pipeline_call(ent, op, args...) \ ((!(ent) || !(ent)->pipe) ? -ENOENT : \ (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \ - (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) \ + (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) #endif /* S5P_FIMC_H_ */ -- 2.29.2 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 10/11] pragma once: delete few backslashes 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 2 siblings, 0 replies; 8+ messages in thread From: Ido Schimmel @ 2021-03-01 8:54 UTC (permalink / raw) To: Alexey Dobriyan Cc: torvalds, linux-kernel, akpm, vgupta, linux-snps-arc, jiri, idosch, netdev, Jason, mchehab On Sun, Feb 28, 2021 at 08:05:14PM +0300, Alexey Dobriyan wrote: > From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan <adobriyan@gmail.com> > Date: Fri, 19 Feb 2021 13:37:24 +0300 > Subject: [PATCH 10/11] pragma once: delete few backslashes > > Some macros contain one backslash too many and end up being the last > macro in a header file. When #pragma once conversion script truncates > the last #endif and whitespace before it, such backslash triggers > a warning about "OMG file ends up in a backslash-newline". > > Needless to say I don't want to handle another case in my script, > so delete useless backslashes instead. > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> For mlxsw: Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 10/11] pragma once: delete few backslashes 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 2 siblings, 0 replies; 8+ messages in thread From: Vineet Gupta @ 2021-03-02 19:00 UTC (permalink / raw) To: Alexey Dobriyan, torvalds Cc: linux-kernel, akpm, linux-snps-arc, jiri, idosch, netdev, Jason, mchehab On 2/28/21 9:05 AM, Alexey Dobriyan wrote: > From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan <adobriyan@gmail.com> > Date: Fri, 19 Feb 2021 13:37:24 +0300 > Subject: [PATCH 10/11] pragma once: delete few backslashes > > Some macros contain one backslash too many and end up being the last > macro in a header file. When #pragma once conversion script truncates > the last #endif and whitespace before it, such backslash triggers > a warning about "OMG file ends up in a backslash-newline". > > Needless to say I don't want to handle another case in my script, > so delete useless backslashes instead. > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> #arch/arc bits Thx, -Vineet > --- > arch/arc/include/asm/cacheflush.h | 2 +- > drivers/net/ethernet/mellanox/mlxsw/item.h | 2 +- > include/linux/once.h | 2 +- > include/media/drv-intf/exynos-fimc.h | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arc/include/asm/cacheflush.h b/arch/arc/include/asm/cacheflush.h > index e201b4b1655a..46704c341b17 100644 > --- a/arch/arc/include/asm/cacheflush.h > +++ b/arch/arc/include/asm/cacheflush.h > @@ -112,6 +112,6 @@ do { \ > } while (0) > > #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ > - memcpy(dst, src, len); \ > + memcpy(dst, src, len) > > #endif > diff --git a/drivers/net/ethernet/mellanox/mlxsw/item.h b/drivers/net/ethernet/mellanox/mlxsw/item.h > index e92cadc98128..cc0133401dd1 100644 > --- a/drivers/net/ethernet/mellanox/mlxsw/item.h > +++ b/drivers/net/ethernet/mellanox/mlxsw/item.h > @@ -504,6 +504,6 @@ mlxsw_##_type##_##_cname##_##_iname##_set(char *buf, u16 index, u8 val) \ > return __mlxsw_item_bit_array_set(buf, \ > &__ITEM_NAME(_type, _cname, _iname), \ > index, val); \ > -} \ > +} > > #endif > diff --git a/include/linux/once.h b/include/linux/once.h > index 9225ee6d96c7..0af450ff94a5 100644 > --- a/include/linux/once.h > +++ b/include/linux/once.h > @@ -55,6 +55,6 @@ void __do_once_done(bool *done, struct static_key_true *once_key, > #define get_random_once(buf, nbytes) \ > DO_ONCE(get_random_bytes, (buf), (nbytes)) > #define get_random_once_wait(buf, nbytes) \ > - DO_ONCE(get_random_bytes_wait, (buf), (nbytes)) \ > + DO_ONCE(get_random_bytes_wait, (buf), (nbytes)) > > #endif /* _LINUX_ONCE_H */ > diff --git a/include/media/drv-intf/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h > index 6b9ef631d6bb..6c5fbdacf4b5 100644 > --- a/include/media/drv-intf/exynos-fimc.h > +++ b/include/media/drv-intf/exynos-fimc.h > @@ -152,6 +152,6 @@ static inline struct exynos_video_entity *vdev_to_exynos_video_entity( > #define fimc_pipeline_call(ent, op, args...) \ > ((!(ent) || !(ent)->pipe) ? -ENOENT : \ > (((ent)->pipe->ops && (ent)->pipe->ops->op) ? \ > - (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) \ > + (ent)->pipe->ops->op(((ent)->pipe), ##args) : -ENOIOCTLCMD)) > > #endif /* S5P_FIMC_H_ */ > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 10/11] pragma once: delete few backslashes 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 2 siblings, 1 reply; 8+ messages in thread From: Edward Cree @ 2021-03-04 14:22 UTC (permalink / raw) To: Alexey Dobriyan, torvalds Cc: linux-kernel, akpm, vgupta, linux-snps-arc, jiri, idosch, netdev, Jason, mchehab On 28/02/2021 17:05, Alexey Dobriyan wrote: > From 251ca5673886b5bb0a42004944290b9d2b267a4a Mon Sep 17 00:00:00 2001 > From: Alexey Dobriyan <adobriyan@gmail.com> > Date: Fri, 19 Feb 2021 13:37:24 +0300 > Subject: [PATCH 10/11] pragma once: delete few backslashes > > Some macros contain one backslash too many and end up being the last > macro in a header file. When #pragma once conversion script truncates > the last #endif and whitespace before it, such backslash triggers > a warning about "OMG file ends up in a backslash-newline". > > Needless to say I don't want to handle another case in my script, > so delete useless backslashes instead. > > Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> > --- > arch/arc/include/asm/cacheflush.h | 2 +- > drivers/net/ethernet/mellanox/mlxsw/item.h | 2 +- > include/linux/once.h | 2 +- > include/media/drv-intf/exynos-fimc.h | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arc/include/asm/cacheflush.h b/arch/arc/include/asm/cacheflush.h > index e201b4b1655a..46704c341b17 100644 > --- a/arch/arc/include/asm/cacheflush.h > +++ b/arch/arc/include/asm/cacheflush.h > @@ -112,6 +112,6 @@ do { \ > } while (0) > > #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ > - memcpy(dst, src, len); \ > + memcpy(dst, src, len) > This changebar also removes a semicolon. It looks plausibly correct, but the commit message ought to mention it. -ed ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 10/11] pragma once: delete few backslashes 2021-03-04 14:22 ` Edward Cree @ 2021-03-23 10:09 ` Pavel Machek 0 siblings, 0 replies; 8+ messages in thread From: Pavel Machek @ 2021-03-23 10:09 UTC (permalink / raw) To: Edward Cree Cc: Alexey Dobriyan, torvalds, linux-kernel, akpm, vgupta, linux-snps-arc, jiri, idosch, netdev, Jason, mchehab [-- Attachment #1: Type: text/plain, Size: 569 bytes --] Hi! > > index e201b4b1655a..46704c341b17 100644 > > --- a/arch/arc/include/asm/cacheflush.h > > +++ b/arch/arc/include/asm/cacheflush.h > > @@ -112,6 +112,6 @@ do { \ > > } while (0) > > > > #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ > > - memcpy(dst, src, len); \ > > + memcpy(dst, src, len) > > This changebar also removes a semicolon. > It looks plausibly correct, but the commit message ought to mention it. Probably should use do{}while(0) trick. Pavel -- http://www.livejournal.com/~pavelmachek [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 12/11] pragma once: scripted treewide conversion [not found] <YDvLYzsGu+l1pQ2y@localhost.localdomain> 2021-02-28 16:58 ` [PATCH 01/11] pragma once: delete include/linux/atm_suni.h Alexey Dobriyan 2021-02-28 17:05 ` [PATCH 10/11] pragma once: delete few backslashes Alexey Dobriyan @ 2021-02-28 17:11 ` Alexey Dobriyan 2 siblings, 0 replies; 8+ messages in thread From: Alexey Dobriyan @ 2021-02-28 17:11 UTC (permalink / raw) To: torvalds, linux-kernel, akpm, linux-arch [ 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 <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 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-23 10:10 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <YDvLYzsGu+l1pQ2y@localhost.localdomain> 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 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:11 ` [PATCH 12/11] pragma once: scripted treewide conversion Alexey Dobriyan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).