public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
@ 2025-05-25 19:00 Krzysztof Kozlowski
  2025-05-25 19:30 ` bluez.test.bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-25 19:00 UTC (permalink / raw)
  To: Amitkumar Karwar, Neeraj Kale, Marcel Holtmann,
	Luiz Augusto von Dentz, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Justin Stitt, linux-bluetooth, linux-kernel, llvm
  Cc: Krzysztof Kozlowski

Return value of devm_request_irq() must be checked (function is even
annotated) and without it clang W=1 complains:

  btnxpuart.c:494:6: error: unused variable 'ret' [-Werror,-Wunused-variable]

Setting up wakeup IRQ handler is not really critical, because the
handler is empty, so just log the informational message so user could
submit proper bug report and silences the clang warning.

Fixes: c50b56664e48 ("Bluetooth: btnxpuart: Implement host-wakeup feature")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/bluetooth/btnxpuart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index b34623a69b8a..6b13feed06df 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -533,6 +533,8 @@ static int ps_setup(struct hci_dev *hdev)
 					ps_host_wakeup_irq_handler,
 					IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
 					dev_name(&serdev->dev), nxpdev);
+		if (ret)
+			bt_dev_info(hdev, "error setting wakeup IRQ handler, ignoring\n");
 		disable_irq(psdata->irq_handler);
 		device_init_wakeup(&serdev->dev, true);
 	}
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
  2025-05-25 19:00 [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Krzysztof Kozlowski
@ 2025-05-25 19:30 ` bluez.test.bot
  2025-05-26  7:23 ` [PATCH] " Neeraj Sanjay Kale
  2025-05-27 13:20 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-05-25 19:30 UTC (permalink / raw)
  To: linux-bluetooth, krzysztof.kozlowski

[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]

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=966267

---Test result---

Test Summary:
CheckPatch                    PENDING   0.24 seconds
GitLint                       PENDING   0.17 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      24.25 seconds
CheckAllWarning               PASS      26.61 seconds
CheckSparse                   PASS      30.35 seconds
BuildKernel32                 PASS      23.83 seconds
TestRunnerSetup               PASS      451.98 seconds
TestRunner_l2cap-tester       PASS      25.04 seconds
TestRunner_iso-tester         PASS      41.49 seconds
TestRunner_bnep-tester        PASS      5.88 seconds
TestRunner_mgmt-tester        FAIL      132.13 seconds
TestRunner_rfcomm-tester      PASS      9.25 seconds
TestRunner_sco-tester         PASS      14.61 seconds
TestRunner_ioctl-tester       PASS      9.67 seconds
TestRunner_mesh-tester        PASS      7.33 seconds
TestRunner_smp-tester         FAIL      10.75 seconds
TestRunner_userchan-tester    PASS      6.03 seconds
IncrementalBuild              PENDING   0.71 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: 482 (98.4%), Failed: 4, Not Run: 4

Failed Test Cases
LL Privacy - Add Device 2 (2 Devices to AL)          Failed       0.189 seconds
LL Privacy - Add Device 3 (AL is full)               Failed       0.229 seconds
LL Privacy - Set Flags 1 (Add to RL)                 Failed       0.160 seconds
LL Privacy - Set Flags 2 (Enable RL)                 Failed       0.181 seconds
##############################
Test: TestRunner_smp-tester - FAIL
Desc: Run smp-tester with test-runner
Output:
WARNING: CPU: 0 PID: 51 at net/bluetooth/hci_conn.c:568 hci_conn_timeout+0x14e/0x190
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
  2025-05-25 19:00 [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Krzysztof Kozlowski
  2025-05-25 19:30 ` bluez.test.bot
@ 2025-05-26  7:23 ` Neeraj Sanjay Kale
  2025-05-27 13:20 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Neeraj Sanjay Kale @ 2025-05-26  7:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Amitkumar Karwar, Marcel Holtmann,
	Luiz Augusto von Dentz, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Justin Stitt, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev

 Hi Krzysztof,

Thank you for the fix.

Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>

Thanks,
Neeraj

> Return value of devm_request_irq() must be checked (function is even
> annotated) and without it clang W=1 complains:
> 
>   btnxpuart.c:494:6: error: unused variable 'ret' [-Werror,-Wunused-variable]
> 
> Setting up wakeup IRQ handler is not really critical, because the handler is
> empty, so just log the informational message so user could submit proper bug
> report and silences the clang warning.
> 
> Fixes: c50b56664e48 ("Bluetooth: btnxpuart: Implement host-wakeup
> feature")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  drivers/bluetooth/btnxpuart.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index b34623a69b8a..6b13feed06df 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -533,6 +533,8 @@ static int ps_setup(struct hci_dev *hdev)
>                                         ps_host_wakeup_irq_handler,
>                                         IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
>                                         dev_name(&serdev->dev), nxpdev);
> +               if (ret)
> +                       bt_dev_info(hdev, "error setting wakeup IRQ
> + handler, ignoring\n");
>                 disable_irq(psdata->irq_handler);
>                 device_init_wakeup(&serdev->dev, true);
>         }
> --
> 2.45.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
  2025-05-25 19:00 [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Krzysztof Kozlowski
  2025-05-25 19:30 ` bluez.test.bot
  2025-05-26  7:23 ` [PATCH] " Neeraj Sanjay Kale
@ 2025-05-27 13:20 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-05-27 13:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, nathan,
	nick.desaulniers+lkml, morbo, justinstitt, linux-bluetooth,
	linux-kernel, llvm

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sun, 25 May 2025 21:00:21 +0200 you wrote:
> Return value of devm_request_irq() must be checked (function is even
> annotated) and without it clang W=1 complains:
> 
>   btnxpuart.c:494:6: error: unused variable 'ret' [-Werror,-Wunused-variable]
> 
> Setting up wakeup IRQ handler is not really critical, because the
> handler is empty, so just log the informational message so user could
> submit proper bug report and silences the clang warning.
> 
> [...]

Here is the summary with links:
  - Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check
    https://git.kernel.org/bluetooth/bluetooth-next/c/4e221e2b5ee0

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-27 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-25 19:00 [PATCH] Bluetooth: btnxpuart: Fix missing devm_request_irq() return value check Krzysztof Kozlowski
2025-05-25 19:30 ` bluez.test.bot
2025-05-26  7:23 ` [PATCH] " Neeraj Sanjay Kale
2025-05-27 13:20 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox