Skip to content

Commit

Permalink
include/linux/unaligned: replace kernel.h with the necessary inclusions
Browse files Browse the repository at this point in the history
When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

The rest of the changes are induced by the above and may not be split.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Arend van Spriel <[email protected]>	[brcmfmac]
Acked-by: Kalle Valo <[email protected]>
Cc: Arend van Spriel <[email protected]>
Cc: Franky Lin <[email protected]>
Cc: Hante Meuleman <[email protected]>
Cc: Chi-hsien Lin <[email protected]>
Cc: Wright Feng <[email protected]>
Cc: Chung-hsien Hsu <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
andy-shev authored and torvalds committed Jan 20, 2022
1 parent 7080cea commit 22c0339
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/

#include <asm/unaligned.h>

#include <linux/math.h>
#include <linux/string.h>
#include <linux/bug.h>

Expand Down
2 changes: 1 addition & 1 deletion include/linux/unaligned/packed_struct.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H
#define _LINUX_UNALIGNED_PACKED_STRUCT_H

#include <linux/kernel.h>
#include <linux/types.h>

struct __una_u16 { u16 x; } __packed;
struct __una_u32 { u32 x; } __packed;
Expand Down
2 changes: 2 additions & 0 deletions lib/lz4/lz4defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
*/

#include <asm/unaligned.h>

#include <linux/bitops.h>
#include <linux/string.h> /* memset, memcpy */

#define FORCE_INLINE __always_inline
Expand Down

0 comments on commit 22c0339

Please sign in to comment.