[PATCH v1] cleanup: Remove extra semicolon when call DEFINE_CLASS()

From: Haiyue Wang
Date: Wed Sep 11 2024 - 09:43:51 EST


The DEFINE_GUARD() adds one more semicolon to call DEFINE_CLASS(), it
expands ';' at the end of function 'class_##_name##_constructor'.

A nit fix, like DEFINE_GUARD_COND() calls EXTEND_CLASS() without ';',
to make code generation clean.

Signed-off-by: Haiyue Wang <haiyue.wang@xxxxxxxxxxx>
---
include/linux/cleanup.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h
index d9e613803df1..abb1d9fd7a99 100644
--- a/include/linux/cleanup.h
+++ b/include/linux/cleanup.h
@@ -152,7 +152,7 @@ static inline class_##_name##_t class_##_name##ext##_constructor(_init_args) \
*/

#define DEFINE_GUARD(_name, _type, _lock, _unlock) \
- DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T); \
+ DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T) \
static inline void * class_##_name##_lock_ptr(class_##_name##_t *_T) \
{ return *_T; }

--
2.46.0