Bluetooth: Remove redundant NULL check
Subsystems (2)
PATCH 1/2 Bluetooth: Remove redundant NULL check
From: Johan Hedberg <[email protected]>
All callers of hci_inquiry_cache_update() pass a non-NULL ssp pointer to it and even the function itself assumes in another place that the pointer is non-NULL. Therefore, remove the redundant check.
--- net/bluetooth/hci_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/hci_core.c +1 -2
@@ -2028,8 +2028,7 @@ bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,hci_remove_remote_oob_data (hdev, &data->bdaddr); -if (ssp) - *ssp = data->ssp_mode; + *ssp = data->ssp_mode; ie =hci_inquiry_cache_lookup (hdev, &data->bdaddr);if (ie) {
Signature · 1 line
1.8.5.3
PATCH 2/2 Bluetooth: Fix line splitting of mgmt_device_found parameters
From: Johan Hedberg <[email protected]>
The line was incorrectly split between the variable type and its name. This patch fixes the issue.
--- include/net/bluetooth/hci_core.h | 4 ++-- net/bluetooth/mgmt.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/hci_core.h +2 -2
@@ -1268,8 +1268,8 @@ void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192, u8 *randomizer192, u8 *hash256, u8 *randomizer256, u8 status);void mgmt_device_found (struct hci_dev *hdev,bdaddr_t *bdaddr,u8 link_type, -u8 addr_type,u8 *dev_class,s8 rssi,u8 cfm_name,u8 - ssp,u8 *eir,u16 eir_len,u8 *scan_rsp, +u8 addr_type,u8 *dev_class,s8 rssi,u8 cfm_name, +u8 ssp,u8 *eir,u16 eir_len,u8 *scan_rsp,u8 scan_rsp_len);void mgmt_remote_name (struct hci_dev *hdev,bdaddr_t *bdaddr,u8 link_type,u8 addr_type,s8 rssi,u8 *name,u8 name_len);
net/bluetooth/mgmt.c +2 -2
@@ -5668,8 +5668,8 @@ void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192, }void mgmt_device_found (struct hci_dev *hdev,bdaddr_t *bdaddr,u8 link_type, -u8 addr_type,u8 *dev_class,s8 rssi,u8 cfm_name,u8 - ssp,u8 *eir,u16 eir_len,u8 *scan_rsp, +u8 addr_type,u8 *dev_class,s8 rssi,u8 cfm_name, +u8 ssp,u8 *eir,u16 eir_len,u8 *scan_rsp,u8 scan_rsp_len) {char buf[512 ];
Signature · 1 line
1.8.5.3
Marcel Holtmann
maintainerRe: [PATCH 2/2] Bluetooth: Fix line splitting of mgmt_device_found parameters
Hi Johan,
Quoted 8 lines
The line was incorrectly split between the variable type and its name. This patch fixes the issue.
Signed-off-by Johan Hedberg <[email protected]>---
include/net/bluetooth/hci_core.h| 4 ++--net/bluetooth/mgmt.c| 4 ++--2 files changed, 4 insertions(+), 4 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Marcel Holtmann
maintainerHi Johan,
Quoted 8 lines
All callers of
hci_inquiry_cache_update()pass a non-NULL ssp pointer to it and even the function itself assumes in another place that the pointer is non-NULL. Therefore, remove the redundant check.Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/hci_core.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel