[PATCH 1/9] tools compiler.h: fix __used definition

Benjamin Berg posted 9 patches 2 weeks, 3 days ago
There is a newer version of this series
[PATCH 1/9] tools compiler.h: fix __used definition
Posted by Benjamin Berg 2 weeks, 3 days ago
From: Benjamin Berg <benjamin.berg@intel.com>

The define mapped to __attribute__((__unused__)) instead of using
__used__.

Fixes: e58e871becec ("tools/lib/lockdep: Remove private kernel headers")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
---
 tools/include/linux/compiler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index 33411ca0cc90..b2c40621d441 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -127,7 +127,7 @@
 #endif
 
 #ifndef __used
-# define __used		__attribute__((__unused__))
+# define __used		__attribute__((__used__))
 #endif
 
 #ifndef __packed
-- 
2.51.0
Re: [PATCH 1/9] tools compiler.h: fix __used definition
Posted by Thomas Weißschuh 2 weeks, 3 days ago
On 2025-09-15 09:11:07+0200, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg@intel.com>
> 
> The define mapped to __attribute__((__unused__)) instead of using
> __used__.

Can you explain why it is a problem and add that it now matches the
definition in the regular include/linux/compiler.h?

Anyways:

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>

> Fixes: e58e871becec ("tools/lib/lockdep: Remove private kernel headers")
> Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
> ---
>  tools/include/linux/compiler.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
> index 33411ca0cc90..b2c40621d441 100644
> --- a/tools/include/linux/compiler.h
> +++ b/tools/include/linux/compiler.h
> @@ -127,7 +127,7 @@
>  #endif
>  
>  #ifndef __used
> -# define __used		__attribute__((__unused__))
> +# define __used		__attribute__((__used__))
>  #endif
>  
>  #ifndef __packed
> -- 
> 2.51.0
>