* [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions
@ 2021-12-09 12:38 Andy Shevchenko
2021-12-09 13:23 ` Arend van Spriel
2021-12-09 14:18 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-12-09 12:38 UTC (permalink / raw)
To: Arend van Spriel, Andy Shevchenko, linux-wireless,
brcm80211-dev-list.pdl, SHA-cyfmac-dev-list, netdev, linux-kernel
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-hsien Lin,
Wright Feng, Chung-hsien Hsu, Kalle Valo, David S. Miller,
Jakub Kicinski, Andrew Morton, heikki.krogerus
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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c | 2 ++
include/linux/unaligned/packed_struct.h | 2 +-
lib/lz4/lz4defs.h | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c
index 2f3c451148db..2f8908074303 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c
@@ -4,6 +4,8 @@
*/
#include <asm/unaligned.h>
+
+#include <linux/math.h>
#include <linux/string.h>
#include <linux/bug.h>
diff --git a/include/linux/unaligned/packed_struct.h b/include/linux/unaligned/packed_struct.h
index c0d817de4df2..f4c8eaf4d012 100644
--- a/include/linux/unaligned/packed_struct.h
+++ b/include/linux/unaligned/packed_struct.h
@@ -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;
diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h
index 673bd206aa98..330aa539b46e 100644
--- a/lib/lz4/lz4defs.h
+++ b/lib/lz4/lz4defs.h
@@ -36,6 +36,8 @@
*/
#include <asm/unaligned.h>
+
+#include <linux/bitops.h>
#include <linux/string.h> /* memset, memcpy */
#define FORCE_INLINE __always_inline
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions
2021-12-09 12:38 [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions Andy Shevchenko
@ 2021-12-09 13:23 ` Arend van Spriel
2021-12-09 14:18 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Arend van Spriel @ 2021-12-09 13:23 UTC (permalink / raw)
To: Andy Shevchenko, linux-wireless, brcm80211-dev-list.pdl,
SHA-cyfmac-dev-list, netdev, linux-kernel
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-hsien Lin,
Wright Feng, Chung-hsien Hsu, Kalle Valo, David S. Miller,
Jakub Kicinski, Andrew Morton, heikki.krogerus
[-- Attachment #1: Type: text/plain, Size: 745 bytes --]
On 12/9/2021 1:38 PM, Andy Shevchenko wrote:
> 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.
For brcmfmac change:
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c | 2 ++
> include/linux/unaligned/packed_struct.h | 2 +-
> lib/lz4/lz4defs.h | 2 ++
> 3 files changed, 5 insertions(+), 1 deletion(-)
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions
2021-12-09 12:38 [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-12-09 13:23 ` Arend van Spriel
@ 2021-12-09 14:18 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-12-09 14:18 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Arend van Spriel, linux-wireless, brcm80211-dev-list.pdl,
SHA-cyfmac-dev-list, netdev, linux-kernel, Arend van Spriel,
Franky Lin, Hante Meuleman, Chi-hsien Lin, Wright Feng,
Chung-hsien Hsu, David S. Miller, Jakub Kicinski, Andrew Morton,
heikki.krogerus
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> 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.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/xtlv.c | 2 ++
> include/linux/unaligned/packed_struct.h | 2 +-
> lib/lz4/lz4defs.h | 2 ++
> 3 files changed, 5 insertions(+), 1 deletion(-)
I assume this will go via some other tree:
Acked-by: Kalle Valo <kvalo@kernel.org>
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-09 14:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-09 12:38 [PATCH v1 1/1] include/linux/unaligned: Replace kernel.h with the necessary inclusions Andy Shevchenko
2021-12-09 13:23 ` Arend van Spriel
2021-12-09 14:18 ` Kalle Valo
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).