[PATCH v4 11/17] bootconfig: use __packed macro for struct xbc_node

Josh Law posted 17 patches 3 weeks, 2 days ago
There is a newer version of this series
[PATCH v4 11/17] bootconfig: use __packed macro for struct xbc_node
Posted by Josh Law 3 weeks, 2 days ago
Replace the open-coded __attribute__((__packed__)) with the kernel
__packed macro for consistency with the rest of the kernel.

Signed-off-by: Josh Law <objecting@objecting.org>
---
 include/linux/bootconfig.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
index 25df9260d206..c37e0096c4f1 100644
--- a/include/linux/bootconfig.h
+++ b/include/linux/bootconfig.h
@@ -53,7 +53,7 @@ struct xbc_node {
 	uint16_t child;
 	uint16_t parent;
 	uint16_t data;
-} __attribute__ ((__packed__));
+} __packed;
 
 #define XBC_KEY		0
 #define XBC_VALUE	(1 << 15)
-- 
2.34.1
Re: [PATCH v4 11/17] bootconfig: use __packed macro for struct xbc_node
Posted by Masami Hiramatsu (Google) 3 weeks, 1 day ago
On Sat, 14 Mar 2026 23:01:49 +0000
Josh Law <objecting@objecting.org> wrote:

> Replace the open-coded __attribute__((__packed__)) with the kernel
> __packed macro for consistency with the rest of the kernel.

NACK. Since I made this header to be shared with user tool.
As you sent in [14/17], this just breaks tools/bootconfig.

Thanks,

> 
> Signed-off-by: Josh Law <objecting@objecting.org>
> ---
>  include/linux/bootconfig.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
> index 25df9260d206..c37e0096c4f1 100644
> --- a/include/linux/bootconfig.h
> +++ b/include/linux/bootconfig.h
> @@ -53,7 +53,7 @@ struct xbc_node {
>  	uint16_t child;
>  	uint16_t parent;
>  	uint16_t data;
> -} __attribute__ ((__packed__));
> +} __packed;
>  
>  #define XBC_KEY		0
>  #define XBC_VALUE	(1 << 15)
> -- 
> 2.34.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>