Re: [RFC][PATCHES] getting rid of asm/unaligned.h includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/11/23 18:49, Al Viro wrote:
> 	The most common include of asm/*.h is that of asm/unaligned.h.
> However, asm/unaligned.h is almost always the same - on everything
> other than arc and parisc it's simply an autogenerated include of
> asm-generic/unaligned.h.  These two architectures do have asm/unaligned.h
> of their own.  However, both instances consist of include of the same
> asm-generic/unaligned.h plus a few definitions that are never used outside
> of arch/{arc,parisc}/kernel/{trap,unaligned}.c.
>
> 	Separating that cruft into arch/{arc,parisc}/kernel/unaligned.h
> allows to kill *all* asm/unaligned.h instances.  The first patch in the
> series does just that; the rest can be done mechanically just before
> the next -rc1 - remove unaligned.h from mandatory-y, move the file from
> asm-generic to linux and do a global search-and-replace of asm/unaligned.h
> to linux/unaligned.h.
>
> 	I've put that into
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #headers.unaligned
> (both getting rid of non-default asm/unaligned.h instances and the mechanical
> followup conversion).  The former patch follows below, the latter ends up
> being 10963 lines long, so if you want to see it, look at
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=headers.unaligned&id=959598f725aa7721a4bad53c2e997c7255ff32dc
> In any case, the second one is just for illustration purpose - it ought to be
> regenerated just before the close of next merge window.
>
> 	I hadn't found any regressions on cross-builds.  Not sure which
> tree should that stuff go through; suggestions?

Anything that makes the 2nd patch easier for you works for me.
I don't anticipate any conflicts in this area so you could keep it
simple and keep arch patches in your tree along side the 2nd one and let
them go directly to Linus whenever that happens.

> From 286cfede3d8ca0fad1528a61293650aa6d63be58 Mon Sep 17 00:00:00 2001
> From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> Date: Tue, 5 Dec 2023 21:53:22 -0500
> Subject: [PATCH 1/2] arc, parisc: get rid of private asm/unaligned.h
>
> Declarations local to arch/*/kernel/*.c are better off *not* in a public
> header - arch/{arc,parisc}/kernel/unaligned.h is just fine for those
> bits.
>
> With that done these asm/unaligned.h instances are reduced to include
> of asm-generic/unaligned.h and can be removed - unaligned.h is in
> mandatory-y in include/asm-generic/Kbuild.
>
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

Acked-by: Vineet Gupta <vgupta@xxxxxxxxxx>  #arch/arc





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux