mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Surendra Patil <surendra.tux@gmail.com>
Cc: rupesh.gujare@atmel.com, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Drivers:staging:ozwpan Replaced wrapper functions with actual spin lock function calls
Date: Mon, 3 Mar 2014 11:05:27 +0300	[thread overview]
Message-ID: <20140303080527.GH26722@mwanda> (raw)
In-Reply-To: <1393729160-23931-1-git-send-email-surendra.tux@gmail.com>

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


      reply	other threads:[~2014-03-03  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02  2:59 Surendra Patil
2014-03-03  8:05 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140303080527.GH26722@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rupesh.gujare@atmel.com \
    --cc=surendra.tux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®