lkml.org 
[lkml]   [2014]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Drivers:staging:ozwpan Replaced wrapper functions with actual spin lock function calls
This patch introduces a bug.

On Sat, Mar 01, 2014 at 06:59:20PM -0800, Surendra Patil wrote:
> Replaced all the spin lock/unlock wrappers from oz_polling_lock_bh()
> and oz_polllin_unlock_bh() with spin_lock_bh(&g_polling_lock) and
> spin_unlock_bh(&g_polling_lock).Completely erased the wrappers defination
> and declaration.
> Module builded successfully with sparse without warnings.
>
> Signed-off-by: Surendra Patil <surendra.tux@gmail.com>
> ---
> drivers/staging/ozwpan/ozpd.c | 29 +++++++++++++++--------------
> drivers/staging/ozwpan/ozproto.c | 9 ---------
> drivers/staging/ozwpan/ozproto.h | 2 --
> 3 files changed, 15 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c
> index 7436950..66c3a2c 100644
> --- a/drivers/staging/ozwpan/ozpd.c
> +++ b/drivers/staging/ozwpan/ozpd.c
> @@ -22,6 +22,7 @@
>
> #define OZ_MAX_TX_POOL_SIZE 6
>
> +static DEFINE_SPINLOCK(g_polling_lock);

This doesn't work. Now you have two lock variables which just happen to
have the same name.

You need to make the original g_polling_lock not static and add a
declaration to the header file.

regards,
dan carpenter



\
 
 \ /
  Last update: 2014-03-03 09:41    [W:0.034 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site