[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240802-container_of_const_fix-v1-1-90e7a5b624f9@quicinc.com>
Date: Fri, 02 Aug 2024 23:15:15 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jason Gunthorpe <jgg@...pe.ca>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Zijun Hu <zijun_hu@...oud.com>,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH] linux/container_of.h: Remove redundant type cast in
container_of_const()
From: Zijun Hu <quic_zijuhu@...cinc.com>
Remove redundant (type *) cast for default branch in container_of_const()
since the cast has been done by container_of().
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
include/linux/container_of.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/container_of.h b/include/linux/container_of.h
index 713890c867be..c36435e7c7f2 100644
--- a/include/linux/container_of.h
+++ b/include/linux/container_of.h
@@ -32,7 +32,7 @@
#define container_of_const(ptr, type, member) \
_Generic(ptr, \
const typeof(*(ptr)) *: ((const type *)container_of(ptr, type, member)),\
- default: ((type *)container_of(ptr, type, member)) \
+ default: container_of(ptr, type, member) \
)
#endif /* _LINUX_CONTAINER_OF_H */
---
base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b
change-id: 20240802-container_of_const_fix-87ecdb71ba90
Best regards,
--
Zijun Hu <quic_zijuhu@...cinc.com>
Powered by blists - more mailing lists