lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 18 May 2021 10:12:56 -0400
From:   Reagan McFarland <me@...ganmcf.com>
To:     marcel@...tmann.org
Cc:     linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Bluetooth: bfusb.c code style cleanup

Code styling / formatting changes made to drivers/bluetooth/bfusb.c to get rid of the warnings
when running the checkpatch.pl script.

Signed-off-by: Reagan McFarland <me@...ganmcf.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 5a321b4076aa..b4da848bdcf5 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.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ