]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Use symbolic names for state in debug
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Fri, 17 Feb 2012 09:40:56 +0000 (11:40 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 17 Feb 2012 11:01:54 +0000 (13:01 +0200)
Use state_to_string function in debug statements.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/l2cap.h
net/bluetooth/hci_conn.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c

index 42fdbb833254a2f3084a41a8fb475220f542ea67..bbb0e214e51db7226fefd7e7f91281bc19938b6a 100644 (file)
@@ -612,7 +612,8 @@ static inline void l2cap_chan_put(struct l2cap_chan *c)
 static inline void l2cap_set_timer(struct l2cap_chan *chan,
                                        struct delayed_work *work, long timeout)
 {
-       BT_DBG("chan %p state %d timeout %ld", chan, chan->state, timeout);
+       BT_DBG("chan %p state %s timeout %ld", chan,
+                                       state_to_string(chan->state), timeout);
 
        if (!cancel_delayed_work(work))
                l2cap_chan_hold(chan);
index b4ecddee11b54fbf2c4da04377bd45f7934506fe..f38e1b11d8356868e27e7c18f86d28c5c9c3f0d1 100644 (file)
@@ -282,7 +282,7 @@ static void hci_conn_timeout(struct work_struct *work)
                                                        disc_work.work);
        __u8 reason;
 
-       BT_DBG("conn %p state %d", conn, conn->state);
+       BT_DBG("conn %p state %s", conn, state_to_string(conn->state));
 
        if (atomic_read(&conn->refcnt))
                return;
index 252a96e474ca1971c7d2ca937dc0ec0ba420962a..88968e711d3dac7dbcb2d4ef86b430e2d6c047f7 100644 (file)
@@ -231,7 +231,7 @@ static void l2cap_chan_timeout(struct work_struct *work)
        struct sock *sk = chan->sk;
        int reason;
 
-       BT_DBG("chan %p state %d", chan, chan->state);
+       BT_DBG("chan %p state %s", chan, state_to_string(chan->state));
 
        lock_sock(sk);
 
@@ -413,7 +413,8 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason)
        struct l2cap_conn *conn = chan->conn;
        struct sock *sk = chan->sk;
 
-       BT_DBG("chan %p state %d socket %p", chan, chan->state, sk->sk_socket);
+       BT_DBG("chan %p state %s sk %p", chan,
+                                       state_to_string(chan->state), sk);
 
        switch (chan->state) {
        case BT_LISTEN:
index 138fe34466783abf90e2047b5aa8fe26fbadfa46..b48d6c1b9db63a2a18514dd9542d81348ed23b1a 100644 (file)
@@ -783,7 +783,7 @@ static void l2cap_sock_kill(struct sock *sk)
        if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
                return;
 
-       BT_DBG("sk %p state %d", sk, sk->sk_state);
+       BT_DBG("sk %p state %s", sk, state_to_string(sk->sk_state));
 
        /* Kill poor orphan */