linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andre Guedes <andre.guedes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/2] Bluetooth: Move debug macros
Date: Tue, 22 Nov 2011 17:14:18 -0300	[thread overview]
Message-ID: <1321992859-12473-2-git-send-email-andre.guedes@openbossa.org> (raw)
In-Reply-To: <1321992859-12473-1-git-send-email-andre.guedes@openbossa.org>

Move debug macros so they provide us more meaningful information
during debugging analysis.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
---
 net/bluetooth/hci_core.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ef0423e..8487483 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2594,11 +2594,11 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
 	u8 lap[3] = { 0x33, 0x8b, 0x9e };
 	struct hci_cp_inquiry cp;
 
-	BT_DBG("%s", hdev->name);
-
 	if (test_bit(HCI_INQUIRY, &hdev->flags))
 		return -EINPROGRESS;
 
+	BT_DBG("%s", hdev->name);
+
 	memset(&cp, 0, sizeof(cp));
 	memcpy(&cp.lap, lap, sizeof(cp.lap));
 	cp.length  = length;
@@ -2608,11 +2608,11 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
 
 int hci_cancel_inquiry(struct hci_dev *hdev)
 {
-	BT_DBG("%s", hdev->name);
-
 	if (!test_bit(HCI_INQUIRY, &hdev->flags))
 		return -EPERM;
 
+	BT_DBG("%s", hdev->name);
+
 	return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL);
 }
 
-- 
1.7.7.1


  reply	other threads:[~2011-11-22 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 20:14 [PATCH 0/2] Add debug macros to Discovery Andre Guedes
2011-11-22 20:14 ` Andre Guedes [this message]
2012-02-03 23:27   ` [PATCH 1/2] Bluetooth: Move debug macros Marcel Holtmann
2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes
2012-02-03 23:17   ` Andre Guedes
2012-02-03 23:27   ` Marcel Holtmann
2012-02-03 23:33     ` Johan Hedberg

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=1321992859-12473-2-git-send-email-andre.guedes@openbossa.org \
    --to=andre.guedes@openbossa.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).