Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib: packing: Include necessary headers

packing.h uses ARRAY_SIZE(), BUILD_BUG_ON_MSG(), min(), max(), and
sizeof_field() without including the headers where they are defined,
potentially causing build failures.

Fix this in packing.h and sort the result.

Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20250624-packing-includes-v1-1-c23c81fab508@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Nathan Lynch and committed by
Jakub Kicinski
8bd0af31 4b70e2a0

+5 -1
+5 -1
include/linux/packing.h
··· 5 5 #ifndef _LINUX_PACKING_H 6 6 #define _LINUX_PACKING_H 7 7 8 - #include <linux/types.h> 8 + #include <linux/array_size.h> 9 9 #include <linux/bitops.h> 10 + #include <linux/build_bug.h> 11 + #include <linux/minmax.h> 12 + #include <linux/stddef.h> 13 + #include <linux/types.h> 10 14 11 15 #define GEN_PACKED_FIELD_STRUCT(__type) \ 12 16 struct packed_field_ ## __type { \