2018-10-03 05:41:17

by Lance Roy

[permalink] [raw]
Subject: [PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

lockdep_assert_held() is better suited to checking locking requirements,
since it won't get confused when someone else holds the lock. This is
also a step towards possibly removing spin_is_locked().

Signed-off-by: Lance Roy <[email protected]>
Cc: Daniel Drake <[email protected]>
Cc: Ulrich Kunitz <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
---
drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
index 1f6d9f357e57..9ccd780695f0 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
@@ -235,7 +235,7 @@ void zd_mac_clear(struct zd_mac *mac)
{
flush_workqueue(zd_workqueue);
zd_chip_clear(&mac->chip);
- ZD_ASSERT(!spin_is_locked(&mac->lock));
+ lockdep_assert_held(&mac->lock);
ZD_MEMCLEAR(mac, sizeof(struct zd_mac));
}

--
2.19.0



2018-10-03 09:07:02

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

Lance Roy <[email protected]> writes:

> lockdep_assert_held() is better suited to checking locking requirements,
> since it won't get confused when someone else holds the lock. This is
> also a step towards possibly removing spin_is_locked().
>
> Signed-off-by: Lance Roy <[email protected]>
> Cc: Daniel Drake <[email protected]>
> Cc: Ulrich Kunitz <[email protected]>
> Cc: Kalle Valo <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> ---
> drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Should I take this or is it going through some other tree?

If it goes to via some other tree:

Acked-by: Kalle Valo <[email protected]>

--
Kalle Valo

2018-10-04 06:57:32

by Lance Roy

[permalink] [raw]
Subject: Re: [PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

On Wed, Oct 03, 2018 at 12:06:48PM +0300, Kalle Valo wrote:
> Lance Roy <[email protected]> writes:
>
> > lockdep_assert_held() is better suited to checking locking requirements,
> > since it won't get confused when someone else holds the lock. This is
> > also a step towards possibly removing spin_is_locked().
> >
> > Signed-off-by: Lance Roy <[email protected]>
> > Cc: Daniel Drake <[email protected]>
> > Cc: Ulrich Kunitz <[email protected]>
> > Cc: Kalle Valo <[email protected]>
> > Cc: "David S. Miller" <[email protected]>
> > Cc: <[email protected]>
> > Cc: <[email protected]>
> > ---
> > drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Should I take this or is it going through some other tree?
Sure you can take this if you like. If not, Paul McKenney will take it in his
tree.

Thanks,
Lance

> If it goes to via some other tree:
>
> Acked-by: Kalle Valo <[email protected]>
>
> --
> Kalle Valo

2018-10-04 10:05:27

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

Lance Roy <[email protected]> writes:

> On Wed, Oct 03, 2018 at 12:06:48PM +0300, Kalle Valo wrote:
>> Lance Roy <[email protected]> writes:
>>
>> > lockdep_assert_held() is better suited to checking locking requirements,
>> > since it won't get confused when someone else holds the lock. This is
>> > also a step towards possibly removing spin_is_locked().
>> >
>> > Signed-off-by: Lance Roy <[email protected]>
>> > Cc: Daniel Drake <[email protected]>
>> > Cc: Ulrich Kunitz <[email protected]>
>> > Cc: Kalle Valo <[email protected]>
>> > Cc: "David S. Miller" <[email protected]>
>> > Cc: <[email protected]>
>> > Cc: <[email protected]>
>> > ---
>> > drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Should I take this or is it going through some other tree?
>
> Sure you can take this if you like. If not, Paul McKenney will take it in his
> tree.

Ok, then I'll take this to wireless-drivers-next. And I'll change the
title prefix to "zd1211rw: ".

--
Kalle Valo

2018-10-05 08:35:44

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 08/16] zd1211rw: Replace spin_is_locked() with lockdep

Lance Roy <[email protected]> wrote:

> lockdep_assert_held() is better suited to checking locking requirements,
> since it won't get confused when someone else holds the lock. This is
> also a step towards possibly removing spin_is_locked().
>
> Signed-off-by: Lance Roy <[email protected]>
> Cc: Daniel Drake <[email protected]>
> Cc: Ulrich Kunitz <[email protected]>
> Cc: Kalle Valo <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

209e957b467b zd1211rw: Replace spin_is_locked() with lockdep

--
https://patchwork.kernel.org/patch/10624325/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches