diff mbox series

[v1] Bluetooth: btnxpuart: Fix compile errors due to BTNXPUART

Message ID 20250307080907.218398-1-neeraj.sanjaykale@nxp.com (mailing list archive)
State New
Headers show
Series [v1] Bluetooth: btnxpuart: Fix compile errors due to BTNXPUART | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester fail TestRunner_mgmt-tester: Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS

Commit Message

Neeraj Sanjay Kale March 7, 2025, 8:09 a.m. UTC
This fixes compilation errors seen due to merging recent patches.

hdev->cmd_timeout was recently renamed to hdev->reset in following
commit:
commit f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset
callback")

Renamed nxp_cmd_timeout() to nxp_reset() accordingly.

In latest master, the check for "local-bd-address" device property seems
to be missing. Added the missing code in the patch.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503070951.EcxRrnHK-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202503071045.5Ac2pLEW-lkp@intel.com/
---
 drivers/bluetooth/btnxpuart.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Comments

bluez.test.bot@gmail.com March 7, 2025, 10:33 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=941409

---Test result---

Test Summary:
CheckPatch                    PENDING   0.21 seconds
GitLint                       PENDING   0.24 seconds
SubjectPrefix                 PASS      0.11 seconds
BuildKernel                   PASS      25.44 seconds
CheckAllWarning               PASS      28.28 seconds
CheckSparse                   PASS      35.22 seconds
BuildKernel32                 PASS      25.27 seconds
TestRunnerSetup               PASS      447.41 seconds
TestRunner_l2cap-tester       PASS      21.57 seconds
TestRunner_iso-tester         PASS      38.39 seconds
TestRunner_bnep-tester        PASS      4.95 seconds
TestRunner_mgmt-tester        FAIL      121.13 seconds
TestRunner_rfcomm-tester      PASS      8.11 seconds
TestRunner_sco-tester         PASS      12.09 seconds
TestRunner_ioctl-tester       PASS      8.74 seconds
TestRunner_mesh-tester        PASS      6.21 seconds
TestRunner_smp-tester         PASS      7.47 seconds
TestRunner_userchan-tester    PASS      5.17 seconds
IncrementalBuild              PENDING   0.85 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
LL Privacy - Add Device 3 (AL is full)               Failed       0.214 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz March 7, 2025, 3:02 p.m. UTC | #2
Hi Neeraj,

On Fri, Mar 7, 2025 at 3:07 AM Neeraj Sanjay Kale
<neeraj.sanjaykale@nxp.com> wrote:
>
> This fixes compilation errors seen due to merging recent patches.
>
> hdev->cmd_timeout was recently renamed to hdev->reset in following
> commit:
> commit f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset
> callback")
>
> Renamed nxp_cmd_timeout() to nxp_reset() accordingly.
>
> In latest master, the check for "local-bd-address" device property seems
> to be missing. Added the missing code in the patch.
>
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202503070951.EcxRrnHK-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202503071045.5Ac2pLEW-lkp@intel.com/
> ---
>  drivers/bluetooth/btnxpuart.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index abe2ccd92604..b3454227c7c6 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -1318,8 +1318,8 @@ static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
>         /* BD address can be assigned only after first reset command. */
>         err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
>         if (err) {
> -               bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%ld)",
> -                          PTR_ERR(skb));
> +               bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%d)",
> +                          err);
>                 return err;
>         }
>
> @@ -1422,7 +1422,7 @@ static bool nxp_wakeup(struct hci_dev *hdev)
>         return false;
>  }
>
> -static void nxp_cmd_timeout(struct hci_dev *hdev)
> +static void nxp_reset(struct hci_dev *hdev)
>  {
>         struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
>
> @@ -1721,9 +1721,15 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
>         hdev->shutdown = nxp_shutdown;
>         hdev->wakeup = nxp_wakeup;
>         hdev->set_bdaddr = nxp_set_bdaddr;
> -       hdev->cmd_timeout = nxp_cmd_timeout;
> +       hdev->reset = nxp_reset;
>         SET_HCIDEV_DEV(hdev, &serdev->dev);
>
> +       device_property_read_u8_array(&nxpdev->serdev->dev,
> +                                     "local-bd-address",
> +                                     (u8 *)&ba, sizeof(ba));
> +       if (bacmp(&ba, BDADDR_ANY))
> +               set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
> +
>         if (hci_register_dev(hdev) < 0) {
>                 dev_err(&serdev->dev, "Can't register HCI device\n");
>                 goto probe_fail;
> --
> 2.25.1

Ive fixed them in place since they were not pushed yet to the net tree.
diff mbox series

Patch

diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index abe2ccd92604..b3454227c7c6 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1318,8 +1318,8 @@  static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
 	/* BD address can be assigned only after first reset command. */
 	err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
 	if (err) {
-		bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%ld)",
-			   PTR_ERR(skb));
+		bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%d)",
+			   err);
 		return err;
 	}
 
@@ -1422,7 +1422,7 @@  static bool nxp_wakeup(struct hci_dev *hdev)
 	return false;
 }
 
-static void nxp_cmd_timeout(struct hci_dev *hdev)
+static void nxp_reset(struct hci_dev *hdev)
 {
 	struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
 
@@ -1721,9 +1721,15 @@  static int nxp_serdev_probe(struct serdev_device *serdev)
 	hdev->shutdown = nxp_shutdown;
 	hdev->wakeup = nxp_wakeup;
 	hdev->set_bdaddr = nxp_set_bdaddr;
-	hdev->cmd_timeout = nxp_cmd_timeout;
+	hdev->reset = nxp_reset;
 	SET_HCIDEV_DEV(hdev, &serdev->dev);
 
+	device_property_read_u8_array(&nxpdev->serdev->dev,
+				      "local-bd-address",
+				      (u8 *)&ba, sizeof(ba));
+	if (bacmp(&ba, BDADDR_ANY))
+		set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
+
 	if (hci_register_dev(hdev) < 0) {
 		dev_err(&serdev->dev, "Can't register HCI device\n");
 		goto probe_fail;