linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: bfusb: Updated code to follow style guide
@ 2024-03-08 16:20 Ayaan Mirza Baig
  2024-03-08 16:43 ` bluez.test.bot
  2024-03-08 18:08 ` [PATCH] Bluetooth: bfusb: Updated code to follow style guide Joe Perches
  0 siblings, 2 replies; 5+ messages in thread
From: Ayaan Mirza Baig @ 2024-03-08 16:20 UTC (permalink / raw)
  To: marcel, luiz.dentz; +Cc: Ayaan Mirza Baig, linux-bluetooth, linux-kernel

Added indendations, removed trailing spaces, added empty lines after declaration.
Fixed Warnings with checkpatch

Signed-off-by: Ayaan Mirza Baig <ayaanmirza.788@gmail.com>
---
 drivers/bluetooth/bfusb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index cab93935cc7f..08beae26e345 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -275,6 +275,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
 		case HCI_EVENT_PKT:
 			if (len >= HCI_EVENT_HDR_SIZE) {
 				struct hci_event_hdr *hdr = (struct hci_event_hdr *) buf;
+
 				pkt_len = HCI_EVENT_HDR_SIZE + hdr->plen;
 			} else {
 				bt_dev_err(data->hdev, "event block is too short");
@@ -285,6 +286,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
 		case HCI_ACLDATA_PKT:
 			if (len >= HCI_ACL_HDR_SIZE) {
 				struct hci_acl_hdr *hdr = (struct hci_acl_hdr *) buf;
+
 				pkt_len = HCI_ACL_HDR_SIZE + __le16_to_cpu(hdr->dlen);
 			} else {
 				bt_dev_err(data->hdev, "data block is too short");
@@ -295,6 +297,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
 		case HCI_SCODATA_PKT:
 			if (len >= HCI_SCO_HDR_SIZE) {
 				struct hci_sco_hdr *hdr = (struct hci_sco_hdr *) buf;
+
 				pkt_len = HCI_SCO_HDR_SIZE + hdr->dlen;
 			} else {
 				bt_dev_err(data->hdev, "audio block is too short");
@@ -365,9 +368,8 @@ static void bfusb_rx_complete(struct urb *urb)
 			buf   += 3;
 		}
 
-		if (count < len) {
+		if (count < len)
 			bt_dev_err(data->hdev, "block extends over URB buffer ranges");
-		}
 
 		if ((hdr & 0xe1) == 0xc1)
 			bfusb_recv_block(data, hdr, buf, len);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-08 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-08 16:20 [PATCH] Bluetooth: bfusb: Updated code to follow style guide Ayaan Mirza Baig
2024-03-08 16:43 ` bluez.test.bot
2024-03-08 18:03   ` [PATCH] Bluetooth: bfusb: corrected mistakes in previous commits Ayaan Mirza Baig
2024-03-08 18:26     ` bluez.test.bot
2024-03-08 18:08 ` [PATCH] Bluetooth: bfusb: Updated code to follow style guide Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).