[PATCH v2 2/3] Bluetooth: btusb: QCA: Replace HCI_VENDOR_PKT usages with HCI_EV_VENDOR
Zijun Hu <[email protected]>
| Newsgroups | org.kernel.vger.linux-bluetooth,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The macros below have different meanings even though they share the same value 0xff: HCI_VENDOR_PKT: HCI packet indicator or type HCI_EV_VENDOR: event code of a VSE These usages of HCI_VENDOR_PKT are wrongly checking an event code. Fix by using HCI_EV_VENDOR for event code. Also fix warning "CHECK: Unnecessary parentheses around comparison" given by checkpatch.pl. Signed-off-by: Zijun Hu <[email protected]> --- drivers/bluetooth/btusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index f7cce0cf472e..3847a0f6d096 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3278,7 +3278,7 @@ static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb) goto out; event_hdr = skb_pull_data(clone, sizeof(*event_hdr)); - if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT)) + if (!event_hdr || event_hdr->evt != HCI_EV_VENDOR) goto out; dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr)); @@ -3304,7 +3304,7 @@ static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb) return false; event_hdr = skb_pull_data(clone, sizeof(*event_hdr)); - if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT)) + if (!event_hdr || event_hdr->evt != HCI_EV_VENDOR) goto out; dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr)); -- 2.34.1