[PATCH] Bluetooth: Remove unnecessary braces
Triet Hoang <[email protected]>
| Newsgroups | org.kernel.vger.linux-bluetooth,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Removing unnecessary braces and splitting statements onto separate lines, with no functional change. Signed-off-by: Triet Hoang <[email protected]> --- drivers/bluetooth/btusb.c | 3 +-- drivers/bluetooth/hci_ldisc.c | 3 ++- drivers/bluetooth/hci_serdev.c | 3 ++- include/net/bluetooth/bluetooth.h | 3 +-- net/bluetooth/hci_conn.c | 9 +++++---- net/bluetooth/hci_core.c | 3 +-- net/bluetooth/l2cap_core.c | 8 +++----- net/bluetooth/mgmt.c | 3 +-- 8 files changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index be82bbbc1b5c..407daaa427f4 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -1076,9 +1076,8 @@ static void btusb_intel_reset(struct hci_dev *hdev) /* If ACPI reset method fails, lets try with legacy GPIO * toggling */ - if (!intel_data->acpi_reset_method(hdev)) { + if (!intel_data->acpi_reset_method(hdev)) return; - } } if (!reset_gpio) { diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 58f5504a336e..680f1939f0a3 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -248,7 +248,8 @@ static int hci_uart_flush(struct hci_dev *hdev) disable_work_sync(&hu->write_work); if (hu->tx_skb) { - kfree_skb(hu->tx_skb); hu->tx_skb = NULL; + kfree_skb(hu->tx_skb); + hu->tx_skb = NULL; } /* Flush any pending characters in the driver and discipline. */ diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c index 593d9cefbbf9..5b0e0c6364cb 100644 --- a/drivers/bluetooth/hci_serdev.c +++ b/drivers/bluetooth/hci_serdev.c @@ -98,7 +98,8 @@ static int hci_uart_flush(struct hci_dev *hdev) BT_DBG("hdev %p serdev %p", hdev, hu->serdev); if (hu->tx_skb) { - kfree_skb(hu->tx_skb); hu->tx_skb = NULL; + kfree_skb(hu->tx_skb); + hu->tx_skb = NULL; } /* Flush any pending characters in the driver and discipline. */ diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index b624da5026f5..4873e8c859f2 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -600,9 +600,8 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk, struct sk_buff *tmp; tmp = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom); - if (IS_ERR(tmp)) { + if (IS_ERR(tmp)) return skb; - } len -= tmp->len; diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 19b7629b1cc1..324c92bbb10b 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1364,11 +1364,13 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src, uint8_t src_type) } if (!bacmp(&id_addr, src) && id_addr_type == src_type) { - hdev = d; break; + hdev = d; + break; } } else { if (bacmp(&d->bdaddr, dst)) { - hdev = d; break; + hdev = d; + break; } } } @@ -1479,9 +1481,8 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, * to connect. */ conn = hci_conn_hash_lookup_le(hdev, dst, dst_type); - if (conn && !test_bit(HCI_CONN_SCANNING, &conn->flags)) { + if (conn && !test_bit(HCI_CONN_SCANNING, &conn->flags)) return ERR_PTR(-EBUSY); - } /* Check if the destination address has been resolved by the controller * since if it did then the identity address shall be used. diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 509c820a693d..c9ee533bb8d1 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2892,9 +2892,8 @@ int hci_recv_frame(struct hci_dev *hdev, struct sk_buff *skb) /* Check if the driver agree with packet type classification */ dev_pkt_type = hci_dev_classify_pkt_type(hdev, skb); - if (hci_skb_pkt_type(skb) != dev_pkt_type) { + if (hci_skb_pkt_type(skb) != dev_pkt_type) hci_skb_pkt_type(skb) = dev_pkt_type; - } switch (hci_skb_pkt_type(skb)) { case HCI_EVENT_PKT: diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ee459dd411f5..975dd033991f 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1431,11 +1431,10 @@ static void l2cap_le_start(struct l2cap_chan *chan) static void l2cap_start_connection(struct l2cap_chan *chan) { - if (chan->conn->hcon->type == LE_LINK) { + if (chan->conn->hcon->type == LE_LINK) l2cap_le_start(chan); - } else { + else l2cap_send_conn_req(chan); - } } static void l2cap_request_info(struct l2cap_conn *conn) @@ -4618,9 +4617,8 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, BT_DBG("dcid 0x%4.4x scid 0x%4.4x", dcid, scid); chan = l2cap_get_chan_by_scid(conn, scid); - if (!chan) { + if (!chan) return 0; - } if (chan->state != BT_DISCONN) { l2cap_chan_unlock(chan); diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 860c086011b7..9494ecf8d2f0 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -818,9 +818,8 @@ static u32 get_supported_settings(struct hci_dev *hdev) settings |= MGMT_SETTING_BREDR; settings |= MGMT_SETTING_LINK_SECURITY; - if (lmp_ssp_capable(hdev)) { + if (lmp_ssp_capable(hdev)) settings |= MGMT_SETTING_SSP; - } if (lmp_sc_capable(hdev)) settings |= MGMT_SETTING_SECURE_CONN; -- 2.53.0