2020-08-11 11:20:27

by Christian König

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

From: Guchun Chen <[email protected]>

Otherwise, braces are needed when using it.

Signed-off-by: Guchun Chen <[email protected]>
Reviewed-by: Christian König <[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 7e5b2a4eb560..7a5bf5d50489 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -179,7 +179,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.25.1


2020-08-12 08:14:14

by Peter Zijlstra

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

On Tue, Aug 11, 2020 at 01:18:52PM +0200, Christian K?nig wrote:
> From: Guchun Chen <[email protected]>
>
> Otherwise, braces are needed when using it.
>
> Signed-off-by: Guchun Chen <[email protected]>
> Reviewed-by: Christian K?nig <[email protected]>

Thanks!

2020-08-12 08:37:16

by Christian König

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

Am 12.08.20 um 10:10 schrieb [email protected]:
> On Tue, Aug 11, 2020 at 01:18:52PM +0200, Christian König wrote:
>> From: Guchun Chen <[email protected]>
>>
>> Otherwise, braces are needed when using it.
>>
>> Signed-off-by: Guchun Chen <[email protected]>
>> Reviewed-by: Christian König <[email protected]>
> Thanks!

Do you pick it up or can I push it through drm-misc-fixes?

If the former please let me know when it hits Linus tree since I have a
driver which contains some extra {} because of this.

Thanks,
Christian.

2020-08-12 10:41:03

by Peter Zijlstra

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

On Wed, Aug 12, 2020 at 10:36:14AM +0200, Christian K?nig wrote:
> Am 12.08.20 um 10:10 schrieb [email protected]:
> > On Tue, Aug 11, 2020 at 01:18:52PM +0200, Christian K?nig wrote:
> > > From: Guchun Chen <[email protected]>
> > >
> > > Otherwise, braces are needed when using it.
> > >
> > > Signed-off-by: Guchun Chen <[email protected]>
> > > Reviewed-by: Christian K?nig <[email protected]>
> > Thanks!
>
> Do you pick it up or can I push it through drm-misc-fixes?
>
> If the former please let me know when it hits Linus tree since I have a
> driver which contains some extra {} because of this.

Oh, in that case you can take it:

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

and I'll drop it from my quilt series.