Skip to contentSkip to conversation

Bluetooth: Use bt_dev_err for RPA generation failure message

PATCH Applied Marcel Holtmann 3 participants 3 messages Mar 9, 2020 – Mar 11, 2020

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Use bt_dev_err for RPA generation failure message

When the RPA generation fails, indicate the error with a device specifc error message.

---
 net/bluetooth/hci_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_request.c +1 -1
index 2a1b64dbf76e..53179ae856ae 100644
@@ -1499,7 +1499,7 @@ int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
 
 		err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa);
 		if (err < 0) {
-			BT_ERR("%s failed to generate new RPA", hdev->name);
+			bt_dev_err(hdev, "failed to generate new RPA");
 			return err;
 		}
 
Signature · 1 line
2.24.1
#1 lore raw

Hi Marcel,

Quoted 23 lines · Marcel Holtmann

When the RPA generation fails, indicate the error with a device specifc error message.

---
 net/bluetooth/hci_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/hci_request.c +1 -2
index 2a1b64dbf76e..53179ae856ae 100644
@@ -1499,7 +1499,7 @@ int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
 
                err = smp_generate_rpa(hdev, hdev->irk, &hdev->rpa);
                if (err < 0) {
-                       BT_ERR("%s failed to generate new RPA", hdev->name);
+                       bt_dev_err(hdev, "failed to generate new RPA");
                        return err;
                }
 
--
Quoted 2 lines

2.24.1

LGTM.