Message ID | 20181003053902.6910-9-ldr709@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 209e957b467b8db0a875763688fd965b5afff905 |
Delegated to: | Kalle Valo |
Headers | show |
Series | None | expand |
Lance Roy <ldr709@gmail.com> 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 <ldr709@gmail.com> > Cc: Daniel Drake <dsd@gentoo.org> > Cc: Ulrich Kunitz <kune@deine-taler.de> > Cc: Kalle Valo <kvalo@codeaurora.org> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: <linux-wireless@vger.kernel.org> > Cc: <netdev@vger.kernel.org> > --- > 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 <kvalo@codeaurora.org>
On Wed, Oct 03, 2018 at 12:06:48PM +0300, Kalle Valo wrote: > Lance Roy <ldr709@gmail.com> 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 <ldr709@gmail.com> > > Cc: Daniel Drake <dsd@gentoo.org> > > Cc: Ulrich Kunitz <kune@deine-taler.de> > > Cc: Kalle Valo <kvalo@codeaurora.org> > > Cc: "David S. Miller" <davem@davemloft.net> > > Cc: <linux-wireless@vger.kernel.org> > > Cc: <netdev@vger.kernel.org> > > --- > > 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 <kvalo@codeaurora.org> > > -- > Kalle Valo
Lance Roy <ldr709@gmail.com> writes: > On Wed, Oct 03, 2018 at 12:06:48PM +0300, Kalle Valo wrote: >> Lance Roy <ldr709@gmail.com> 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 <ldr709@gmail.com> >> > Cc: Daniel Drake <dsd@gentoo.org> >> > Cc: Ulrich Kunitz <kune@deine-taler.de> >> > Cc: Kalle Valo <kvalo@codeaurora.org> >> > Cc: "David S. Miller" <davem@davemloft.net> >> > Cc: <linux-wireless@vger.kernel.org> >> > Cc: <netdev@vger.kernel.org> >> > --- >> > 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: ".
Lance Roy <ldr709@gmail.com> 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 <ldr709@gmail.com> > Cc: Daniel Drake <dsd@gentoo.org> > Cc: Ulrich Kunitz <kune@deine-taler.de> > Cc: Kalle Valo <kvalo@codeaurora.org> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: <linux-wireless@vger.kernel.org> > Cc: <netdev@vger.kernel.org> Patch applied to wireless-drivers-next.git, thanks. 209e957b467b zd1211rw: Replace spin_is_locked() with lockdep
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)); }
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 <ldr709@gmail.com> Cc: Daniel Drake <dsd@gentoo.org> Cc: Ulrich Kunitz <kune@deine-taler.de> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: <linux-wireless@vger.kernel.org> Cc: <netdev@vger.kernel.org> --- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)