2022-01-14 08:38:07

by Chen, Guchun

[permalink] [raw]
Subject: [PATCH] locking/rwsem: drop redundant semicolon of down_write_nest_lock

Otherwise, braces are needed when using it.

Signed-off-by: Guchun Chen <[email protected]>
---
include/linux/rwsem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index f9348769e558..efa5c324369a 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -230,7 +230,7 @@ extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *
do { \
typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \
_down_write_nest_lock(sem, &(nest_lock)->dep_map); \
-} while (0);
+} while (0)

/*
* Take/release a lock when not the owner will release it.
--
2.17.1



2022-01-14 08:41:07

by Christian König

[permalink] [raw]
Subject: Re: [PATCH] locking/rwsem: drop redundant semicolon of down_write_nest_lock

Am 14.01.22 um 09:37 schrieb Guchun Chen:
> Otherwise, braces are needed when using it.
>
> Signed-off-by: Guchun Chen <[email protected]>

Acked-by: Christian König <[email protected]>

Peter any objections that we push this upstream through the drm subsystem?

Thanks,
Christian.

> ---
> include/linux/rwsem.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
> index f9348769e558..efa5c324369a 100644
> --- a/include/linux/rwsem.h
> +++ b/include/linux/rwsem.h
> @@ -230,7 +230,7 @@ extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *
> do { \
> typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \
> _down_write_nest_lock(sem, &(nest_lock)->dep_map); \
> -} while (0);
> +} while (0)
>
> /*
> * Take/release a lock when not the owner will release it.


2022-01-14 08:48:59

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH] locking/rwsem: drop redundant semicolon of down_write_nest_lock

On Fri, Jan 14, 2022 at 09:40:54AM +0100, Christian K?nig wrote:
> Am 14.01.22 um 09:37 schrieb Guchun Chen:
> > Otherwise, braces are needed when using it.
> >
> > Signed-off-by: Guchun Chen <[email protected]>
>
> Acked-by: Christian K?nig <[email protected]>
>
> Peter any objections that we push this upstream through the drm subsystem?

Nah, take it.

Acked-by: Peter Zijlstra (Intel) <[email protected]>