diff mbox series

Bluetooth: Use bt_dev_err for RPA generation failure message

Message ID 20200309214810.431559-1-marcel@holtmann.org (mailing list archive)
State Accepted
Delegated to: Johan Hedberg
Headers show
Series Bluetooth: Use bt_dev_err for RPA generation failure message | expand

Commit Message

Marcel Holtmann March 9, 2020, 9:48 p.m. UTC
When the RPA generation fails, indicate the error with a device specifc
error message.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alain Michaud March 10, 2020, 3:12 p.m. UTC | #1
Hi Marcel,


On Mon, Mar 9, 2020 at 5:48 PM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> When the RPA generation fails, indicate the error with a device specifc
> error message.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_request.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
> index 2a1b64dbf76e..53179ae856ae 100644
> --- a/net/bluetooth/hci_request.c
> +++ b/net/bluetooth/hci_request.c
> @@ -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;
>                 }
>
> --
> 2.24.1
>

LGTM.
Johan Hedberg March 11, 2020, 8:07 a.m. UTC | #2
Hi Marcel,

On Mon, Mar 09, 2020, Marcel Holtmann wrote:
> When the RPA generation fails, indicate the error with a device specifc
> error message.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_request.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to bluetooth-next. Thanks.

Johan
diff mbox series

Patch

diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 2a1b64dbf76e..53179ae856ae 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -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;
 		}