Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_core: add missing braces when using macro parameters

Macro parameters should always be put into braces when accessing it.

Fixes: 4fc9857ab8c6 ("Bluetooth: hci_sync: Add check simultaneous roles support")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Christian Eggers and committed by
Luiz Augusto von Dentz
cdee6a44 dfef8d87

+11 -11
+11 -11
include/net/bluetooth/hci_core.h
··· 829 829 #define hci_dev_test_and_clear_flag(hdev, nr) test_and_clear_bit((nr), (hdev)->dev_flags) 830 830 #define hci_dev_test_and_change_flag(hdev, nr) test_and_change_bit((nr), (hdev)->dev_flags) 831 831 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); \ 839 839 } while (0) 840 840 841 841 #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 */ 846 846 847 847 /* ----- HCI interface to upper protocols ----- */ 848 848 int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);