提交 d129f188 编写于 作者: P Pavel Machek 提交者: David S. Miller

hci_usb: remove code obfuscation

_urb_free is an alias for kfree... making code longer & harder to
read. Remove it.
Signed-off-by: NPavel Machek <pavel@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b132fba1
...@@ -265,7 +265,7 @@ static int hci_usb_intr_rx_submit(struct hci_usb *husb) ...@@ -265,7 +265,7 @@ static int hci_usb_intr_rx_submit(struct hci_usb *husb)
BT_ERR("%s intr rx submit failed urb %p err %d", BT_ERR("%s intr rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -302,7 +302,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb) ...@@ -302,7 +302,7 @@ static int hci_usb_bulk_rx_submit(struct hci_usb *husb)
BT_ERR("%s bulk rx submit failed urb %p err %d", BT_ERR("%s bulk rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -353,7 +353,7 @@ static int hci_usb_isoc_rx_submit(struct hci_usb *husb) ...@@ -353,7 +353,7 @@ static int hci_usb_isoc_rx_submit(struct hci_usb *husb)
BT_ERR("%s isoc rx submit failed urb %p err %d", BT_ERR("%s isoc rx submit failed urb %p err %d",
husb->hdev->name, urb, err); husb->hdev->name, urb, err);
_urb_unlink(_urb); _urb_unlink(_urb);
_urb_free(_urb); kfree(_urb);
kfree(buf); kfree(buf);
} }
return err; return err;
...@@ -431,7 +431,7 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb) ...@@ -431,7 +431,7 @@ static void hci_usb_unlink_urbs(struct hci_usb *husb)
husb->hdev->name, _urb, _urb->type, urb); husb->hdev->name, _urb, _urb->type, urb);
kfree(urb->setup_packet); kfree(urb->setup_packet);
kfree(urb->transfer_buffer); kfree(urb->transfer_buffer);
_urb_free(_urb); kfree(_urb);
} }
} }
} }
...@@ -490,7 +490,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) ...@@ -490,7 +490,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb)
dr = kmalloc(sizeof(*dr), GFP_ATOMIC); dr = kmalloc(sizeof(*dr), GFP_ATOMIC);
if (!dr) { if (!dr) {
_urb_free(_urb); kfree(_urb);
return -ENOMEM; return -ENOMEM;
} }
} else } else
......
...@@ -60,11 +60,6 @@ struct _urb { ...@@ -60,11 +60,6 @@ struct _urb {
struct urb urb; struct urb urb;
}; };
static inline void _urb_free(struct _urb *_urb)
{
kfree(_urb);
}
static inline void _urb_queue_init(struct _urb_queue *q) static inline void _urb_queue_init(struct _urb_queue *q)
{ {
INIT_LIST_HEAD(&q->head); INIT_LIST_HEAD(&q->head);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册