Linux wireless drivers development
 help / color / mirror / Atom feed
From: Holger Schurig <hs4233@mail.mn-solutions.de>
To: Linux Wireless <linux-wireless@vger.kernel.org>
Cc: libertas-dev@lists.infradead.org
Subject: question about ...: wrong count at exit"
Date: Thu, 29 May 2008 09:37:22 +0200	[thread overview]
Message-ID: <200805290937.22146.hs4233@mail.mn-solutions.de> (raw)

After pulling the newest sparse, I got some new sparse warnings
which puzzle me. Here's one of them:

drivers/net/wireless/libertas/main.c:477:9: warning: context imbalance in 'lbs_eth_stop': wrong count at exit
drivers/net/wireless/libertas/main.c:477:9:    context 'lock': wanted 0, got 1

However, the function looks quite innocent, and I cannot see
any imbalance there. Did I oversee something or is that a
problem of sparse?

static int lbs_eth_stop(struct net_device *dev)
{
        struct lbs_private *priv = (struct lbs_private *) dev->priv;

        lbs_deb_enter(LBS_DEB_NET);

        spin_lock_irq(&priv->driver_lock);
        priv->infra_open = 0;
        netif_stop_queue(dev);
        spin_unlock_irq(&priv->driver_lock);

        schedule_work(&priv->mcast_work);

        lbs_deb_leave(LBS_DEB_NET);
        return 0;
}

             reply	other threads:[~2008-05-29  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29  7:37 Holger Schurig [this message]
2008-05-29  7:49 ` question about ...: wrong count at exit" Johannes Berg
2008-05-29  8:05   ` Holger Schurig
2008-05-29  8:07     ` Johannes Berg
2008-05-29  8:07   ` Tomas Winkler
2008-05-29  8:33     ` Johannes Berg
2008-05-29  8:37       ` Johannes Berg

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=200805290937.22146.hs4233@mail.mn-solutions.de \
    --to=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /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