Re: [RFCv0 4/5] Bluetooth: Remove unneeded sk variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On Mon, Jan 30, 2012 at 1:09 PM, Emeltchenko Andrei
<Andrei.Emeltchenko.news@xxxxxxxxx> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
>
> In debug use chan %p instead of sk.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
> ---
>  net/bluetooth/l2cap_core.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index a7e5a55..4a22602 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1589,13 +1589,12 @@ static struct sk_buff *l2cap_create_connless_pdu(struct l2cap_chan *chan,
>                                                struct msghdr *msg, size_t len,
>                                                u32 priority)
>  {
> -       struct sock *sk = chan->sk;
>        struct l2cap_conn *conn = chan->conn;
>        struct sk_buff *skb;
>        int err, count, hlen = L2CAP_HDR_SIZE + L2CAP_PSMLEN_SIZE;
>        struct l2cap_hdr *lh;
>
> -       BT_DBG("sk %p len %d priority %u", sk, (int)len, priority);
> +       BT_DBG("chan %p len %d priority %u", chan, (int)len, priority);
>
>        count = min_t(unsigned int, (conn->mtu - hlen), len);
>
> @@ -1625,13 +1624,12 @@ static struct sk_buff *l2cap_create_basic_pdu(struct l2cap_chan *chan,
>                                                struct msghdr *msg, size_t len,
>                                                u32 priority)
>  {
> -       struct sock *sk = chan->sk;
>        struct l2cap_conn *conn = chan->conn;
>        struct sk_buff *skb;
>        int err, count, hlen = L2CAP_HDR_SIZE;
>        struct l2cap_hdr *lh;
>
> -       BT_DBG("sk %p len %d", sk, (int)len);
> +       BT_DBG("chan %p len %d", chan, (int)len);
>
>        count = min_t(unsigned int, (conn->mtu - hlen), len);
>
> @@ -1660,13 +1658,12 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct l2cap_chan *chan,
>                                                struct msghdr *msg, size_t len,
>                                                u32 control, u16 sdulen)
>  {
> -       struct sock *sk = chan->sk;
>        struct l2cap_conn *conn = chan->conn;
>        struct sk_buff *skb;
>        int err, count, hlen;
>        struct l2cap_hdr *lh;
>
> -       BT_DBG("sk %p len %d", sk, (int)len);
> +       BT_DBG("chan %p len %d", chan, (int)len);
>
>        if (!conn)
>                return ERR_PTR(-ENOTCONN);

This one looks good to me.

Regards,

-- 
Ulisses Furquim
ProFUSION embedded systems
http://profusion.mobi
Mobile: +55 19 9250 0942
Skype: ulissesffs
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux