[PATCH 2/3] container_of: remove useless pair of parentheses

From: Vincent Mailhol

Date: Tue Jul 14 2026 - 14:19:58 EST


The last expression in container_of() doesn't need an extra pair of
parenthesis. Remove it.

Signed-off-by: Vincent Mailhol <mailhol@xxxxxxxxxx>
---
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 28500a62ab7e..68153170db32 100644
--- a/include/linux/container_of.h
+++ b/include/linux/container_of.h
@@ -21,7 +21,7 @@
static_assert(__same_type(*(ptr), typeof_member(type, member)) || \
__same_type(*(ptr), void), \
"pointer type mismatch in container_of()"); \
- ((type *)(__mptr - offsetof(type, member))); })
+ (type *)(__mptr - offsetof(type, member)); })

/**
* container_of_const - cast a member of a structure out to the containing

--
2.54.0