Skip to content

Commit

Permalink
move asm/unaligned.h to linux/unaligned.h
Browse files Browse the repository at this point in the history
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h

Acked-by: Vineet Gupta <[email protected]>
Signed-off-by: Al Viro <[email protected]>
[Louis: backport - strip non-nfp and add compat]
Signed-off-by: Louis Peens <[email protected]>
Reviewed-by: Ryno Swart <[email protected]>
  • Loading branch information
Al Viro authored and louis-peens committed Oct 9, 2024
1 parent 07e9682 commit 88fcc0e
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crypto/ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/ktime.h>
#include <net/xfrm.h>

Expand Down
6 changes: 6 additions & 0 deletions src/nfpcore/nfp6000_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
* abstraction builds upon this BAR interface.
*/

#include "nfpcore/kcompat.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kref.h>
Expand Down
6 changes: 6 additions & 0 deletions src/nfpcore/nfp_cppcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
* Rolf Neugebauer <[email protected]>
*/

#include "nfpcore/kcompat.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/ioport.h>
Expand Down
4 changes: 4 additions & 0 deletions src/nfpcore/nfp_cpplib.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
*/
#include "kcompat.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#if VER_NON_RHEL_GE(4, 9) || VER_RHEL_GE(7, 5)
#include <linux/bitfield.h>
#endif
Expand Down
6 changes: 6 additions & 0 deletions src/nfpcore/nfp_hwinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@
* (ie, in this example, ME 39 has been reserved by boardconfig.)
*/

#include "nfpcore/kcompat.h"

#include <asm/byteorder.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#include <linux/delay.h>
#include <linux/log2.h>
#include <linux/kernel.h>
Expand Down
4 changes: 4 additions & 0 deletions src/nfpcore/nfp_nsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
*/
#include "kcompat.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif
#if VER_NON_RHEL_GE(4, 9) || VER_RHEL_GE(7, 5)
#include <linux/bitfield.h>
#endif
Expand Down
5 changes: 5 additions & 0 deletions src/nfpcore/nfp_rtsym.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
*/
#include "kcompat.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
#include <asm/unaligned.h>
#else
#include <linux/unaligned.h>
#endif

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
Expand Down

0 comments on commit 88fcc0e

Please sign in to comment.