Skip to content

Commit cdee6a4

Browse files
ceggers-arriVudentz
authored andcommitted
Bluetooth: hci_core: add missing braces when using macro parameters
Macro parameters should always be put into braces when accessing it. Fixes: 4fc9857 ("Bluetooth: hci_sync: Add check simultaneous roles support") Signed-off-by: Christian Eggers <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent dfef8d8 commit cdee6a4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

include/net/bluetooth/hci_core.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -829,20 +829,20 @@ extern struct mutex hci_cb_list_lock;
829829
#define hci_dev_test_and_clear_flag(hdev, nr) test_and_clear_bit((nr), (hdev)->dev_flags)
830830
#define hci_dev_test_and_change_flag(hdev, nr) test_and_change_bit((nr), (hdev)->dev_flags)
831831

832-
#define hci_dev_clear_volatile_flags(hdev) \
833-
do { \
834-
hci_dev_clear_flag(hdev, HCI_LE_SCAN); \
835-
hci_dev_clear_flag(hdev, HCI_LE_ADV); \
836-
hci_dev_clear_flag(hdev, HCI_LL_RPA_RESOLUTION);\
837-
hci_dev_clear_flag(hdev, HCI_PERIODIC_INQ); \
838-
hci_dev_clear_flag(hdev, HCI_QUALITY_REPORT); \
832+
#define hci_dev_clear_volatile_flags(hdev) \
833+
do { \
834+
hci_dev_clear_flag((hdev), HCI_LE_SCAN); \
835+
hci_dev_clear_flag((hdev), HCI_LE_ADV); \
836+
hci_dev_clear_flag((hdev), HCI_LL_RPA_RESOLUTION); \
837+
hci_dev_clear_flag((hdev), HCI_PERIODIC_INQ); \
838+
hci_dev_clear_flag((hdev), HCI_QUALITY_REPORT); \
839839
} while (0)
840840

841841
#define hci_dev_le_state_simultaneous(hdev) \
842-
(!test_bit(HCI_QUIRK_BROKEN_LE_STATES, &hdev->quirks) && \
843-
(hdev->le_states[4] & 0x08) && /* Central */ \
844-
(hdev->le_states[4] & 0x40) && /* Peripheral */ \
845-
(hdev->le_states[3] & 0x10)) /* Simultaneous */
842+
(!test_bit(HCI_QUIRK_BROKEN_LE_STATES, &(hdev)->quirks) && \
843+
((hdev)->le_states[4] & 0x08) && /* Central */ \
844+
((hdev)->le_states[4] & 0x40) && /* Peripheral */ \
845+
((hdev)->le_states[3] & 0x10)) /* Simultaneous */
846846

847847
/* ----- HCI interface to upper protocols ----- */
848848
int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);

0 commit comments

Comments
 (0)