Bluetooth: Remove unnecessary braces
Subsystems (2)
PATCH 1/1 Bluetooth: Remove unnecessary braces
Removing unnecessary braces and splitting statements onto separate lines, with no functional change.
--- 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(-)
drivers/bluetooth/btusb.c +1 -2
@@ -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) {
drivers/bluetooth/hci_ldisc.c +2 -1
@@ -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. */
drivers/bluetooth/hci_serdev.c +2 -1
@@ -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. */
include/net/bluetooth/bluetooth.h +1 -2
@@ -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;
net/bluetooth/hci_conn.c +5 -4
@@ -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.
net/bluetooth/hci_core.c +1 -2
@@ -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 :
net/bluetooth/l2cap_core.c +3 -5
@@ -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);
net/bluetooth/mgmt.c +1 -2
@@ -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 ;
Signature · 1 line
2.53.0
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: net/bluetooth/l2cap_core.c:4618
error: net/bluetooth/l2cap_core.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
Hi Triet,
I think multiple lines are not to be submitted. If the patch can be broken down into separate patches, it should be.
Thanks,
Jeremy Dean