[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FDC088D3B5555644AE135ED28A7ABDE94DF5256D@EU-MBX-02.mgc.mentorg.com>
Date: Thu, 11 Sep 2014 10:36:42 +0000
From: "Sharma, Sanjeev" <Sanjeev_Sharma@...tor.com>
To: Johannes Berg <johannes@...solutions.net>
CC: "dsd@...too.org" <dsd@...too.org>,
"kune@...ne-taler.de" <kune@...ne-taler.de>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2] zd1211rw: replace ZD_ASSERT with
lockdep_assert_held()
-----Original Message-----
From: Johannes Berg [mailto:johannes@...solutions.net]
Sent: Thursday, September 11, 2014 3:42 PM
To: Sharma, Sanjeev
Cc: dsd@...too.org; kune@...ne-taler.de; linux-wireless@...r.kernel.org; linux-kernel@...r.kernel.org; netdev@...r.kernel.org
Subject: Re: [PATCH v2] zd1211rw: replace ZD_ASSERT with lockdep_assert_held()
On Thu, 2014-09-11 at 15:39 +0530, Sanjeev Sharma wrote:
> on some architecture spin_is_locked() always return false in
> uniprocessor configuration and therefore it would be advise to replace
> with lockdep_assert_held().
>
> Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@...tor.com>
> ---
> Changes in v2:
> - corrected the typo
> Now it compiles, but you got the logic wrong.
> +++ b/drivers/net/wireless/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)); }
>Look closely at this again.
I didn't understand where I put wrong logic ?
Regards
Sanjeev Sharma
Powered by blists - more mailing lists