All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/7] Bluetooth: debug: Print l2cap refcount
Date: Tue, 10 Jul 2012 15:33:33 -0300	[thread overview]
Message-ID: <20120710183333.GC13847@joana> (raw)
In-Reply-To: <1341923271-14222-2-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-07-10 15:27:45 +0300]:

> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  include/net/bluetooth/l2cap.h |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
> index d80e3f0..dfe9374 100644
> --- a/include/net/bluetooth/l2cap.h
> +++ b/include/net/bluetooth/l2cap.h
> @@ -672,11 +672,17 @@ enum {
>  
>  static inline void l2cap_chan_hold(struct l2cap_chan *c)
>  {
> +	BT_DBG("chan %p refcnt %d -> %d", c, atomic_read(&c->refcnt),
> +	       atomic_read(&c->refcnt) + 1);
> +

We don't really need to call atomic_read() twice read. Just print the new
value and the log reader has to figure it out.

	Gustavo

  reply	other threads:[~2012-07-10 18:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 12:27 [PATCH 0/7] Bluetooth: Correct debug code Andrei Emeltchenko
2012-07-10 12:27 ` [PATCH 1/7] Bluetooth: debug: Print l2cap refcount Andrei Emeltchenko
2012-07-10 18:33   ` Gustavo Padovan [this message]
2012-07-11 11:37     ` Andrei Emeltchenko
2012-07-11 11:43     ` [PATCH 1/2] Bluetooth: debug: Print l2cap_chan refcount Andrei Emeltchenko
2012-07-11 11:43       ` [PATCH 2/2] Bluetooth: debug: Print amp_mgr refcnt Andrei Emeltchenko
2012-07-11 13:10         ` Gustavo Padovan
2012-07-10 12:27 ` [PATCH 2/7] " Andrei Emeltchenko
2012-07-10 12:27 ` [PATCH 3/7] Bluetooth: debug: Add printing num of cmds queued Andrei Emeltchenko
2012-07-10 12:27 ` [PATCH 4/7] Bluetooth: debug: Use standard hex object specifier Andrei Emeltchenko
2012-07-10 18:38   ` Gustavo Padovan
2012-07-11 11:32     ` [PATCH] Bluetooth: debug: Use standard hex object specifiers in hci_event Andrei Emeltchenko
2012-07-11 13:07       ` Gustavo Padovan
2012-07-10 12:27 ` [PATCH 5/7] Bluetooth: debug: Correct types specifiers for L2CAP Andrei Emeltchenko
2012-07-10 12:27 ` [PATCH 6/7] Bluetooth: debug: Print CID and PSM in hex format Andrei Emeltchenko
2012-07-10 12:27 ` [PATCH 7/7] Bluetooth: debug: Add debug to l2cap_security_cfm Andrei Emeltchenko
2012-07-10 18:44   ` Gustavo Padovan

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=20120710183333.GC13847@joana \
    --to=gustavo@padovan.org \
    --cc=Andrei.Emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.