Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c2453f3 authored by Andrei Emeltchenko's avatar Andrei Emeltchenko Committed by Gustavo Padovan
Browse files

Bluetooth: btmrvl: trivial style fixes



Patch shortens locals scope and adds missing braces. This is a diff
between v1 which was applied and v2 of patch "Bluetooth: btmrvl: Do
not send vendor events to bluetooth stack".

Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent ce2be9ac
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -47,10 +47,11 @@ EXPORT_SYMBOL_GPL(btmrvl_interrupt);
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
{
	struct hci_event_hdr *hdr = (void *) skb->data;
	struct hci_event_hdr *hdr = (void *) skb->data;

	if (hdr->evt == HCI_EV_CMD_COMPLETE) {
		struct hci_ev_cmd_complete *ec;
		struct hci_ev_cmd_complete *ec;
		u16 opcode, ocf, ogf;
		u16 opcode, ocf, ogf;


	if (hdr->evt == HCI_EV_CMD_COMPLETE) {
		ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
		ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
		opcode = __le16_to_cpu(ec->opcode);
		opcode = __le16_to_cpu(ec->opcode);
		ocf = hci_opcode_ocf(opcode);
		ocf = hci_opcode_ocf(opcode);
@@ -64,7 +65,8 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
		}
		}


		if (ogf == OGF) {
		if (ogf == OGF) {
			BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
			BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
			       ogf, ocf);
			kfree_skb(skb);
			kfree_skb(skb);
			return false;
			return false;
		}
		}
+2 −1
Original line number Original line Diff line number Diff line
@@ -568,8 +568,9 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
		if (type == HCI_EVENT_PKT) {
		if (type == HCI_EVENT_PKT) {
			if (btmrvl_check_evtpkt(priv, skb))
			if (btmrvl_check_evtpkt(priv, skb))
				hci_recv_frame(skb);
				hci_recv_frame(skb);
		} else
		} else {
			hci_recv_frame(skb);
			hci_recv_frame(skb);
		}


		hdev->stat.byte_rx += buf_len;
		hdev->stat.byte_rx += buf_len;
		break;
		break;