* [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram
@ 2026-02-03 7:10 Dongyang Jin
2026-02-03 7:48 ` bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dongyang Jin @ 2026-02-03 7:10 UTC (permalink / raw)
To: marcel, luiz.dentz; +Cc: linux-bluetooth, linux-kernel, Dongyang Jin
There is no point in having the label since all it does is return the
value in the 'err' variable. Instead make every goto return directly
and remove the label.
Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
---
drivers/bluetooth/btbcm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index d33cc70eec66..dccfbeee4721 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -223,7 +223,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
err = PTR_ERR(skb);
bt_dev_err(hdev, "BCM: Download Minidrv command failed (%d)",
err);
- goto done;
+ return err;
}
kfree_skb(skb);
@@ -242,8 +242,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
if (fw_size < cmd->plen) {
bt_dev_err(hdev, "BCM: Patch is corrupted");
- err = -EINVAL;
- goto done;
+ return -EINVAL;
}
cmd_param = fw_ptr;
@@ -258,7 +257,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
err = PTR_ERR(skb);
bt_dev_err(hdev, "BCM: Patch command %04x failed (%d)",
opcode, err);
- goto done;
+ return err;
}
kfree_skb(skb);
}
@@ -266,8 +265,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
/* 250 msec delay after Launch Ram completes */
msleep(250);
-done:
- return err;
+ return 0;
}
EXPORT_SYMBOL(btbcm_patchram);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: Bluetooth: btbcm: remove done label in btbcm_patchram
2026-02-03 7:10 [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram Dongyang Jin
@ 2026-02-03 7:48 ` bluez.test.bot
2026-02-03 8:55 ` [PATCH] " Paul Menzel
2026-02-11 19:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-02-03 7:48 UTC (permalink / raw)
To: linux-bluetooth, jindongyang
[-- Attachment #1: Type: text/plain, Size: 3016 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=1050120
---Test result---
Test Summary:
CheckPatch PENDING 0.27 seconds
GitLint PENDING 0.21 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 26.18 seconds
CheckAllWarning PASS 28.24 seconds
CheckSparse WARNING 31.90 seconds
BuildKernel32 PASS 25.75 seconds
TestRunnerSetup PASS 565.49 seconds
TestRunner_l2cap-tester PASS 28.76 seconds
TestRunner_iso-tester PASS 82.46 seconds
TestRunner_bnep-tester PASS 6.30 seconds
TestRunner_mgmt-tester FAIL 115.56 seconds
TestRunner_rfcomm-tester PASS 9.52 seconds
TestRunner_sco-tester FAIL 14.58 seconds
TestRunner_ioctl-tester PASS 10.34 seconds
TestRunner_mesh-tester FAIL 12.41 seconds
TestRunner_smp-tester PASS 8.67 seconds
TestRunner_userchan-tester PASS 6.67 seconds
IncrementalBuild PENDING 0.49 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
drivers/bluetooth/btbcm.c:778:1: error: bad constant expressiondrivers/bluetooth/btbcm.c:779:1: error: bad constant expressiondrivers/bluetooth/btbcm.c:780:1: error: bad constant expressiondrivers/bluetooth/btbcm.c:781:1: error: bad constant expressiondrivers/bluetooth/btbcm.c:781:1: error: bad constant expression
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.101 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.653 seconds
Mesh - Send cancel - 2 Timed out 1.999 seconds
##############################
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
* Re: [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram
2026-02-03 7:10 [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram Dongyang Jin
2026-02-03 7:48 ` bluez.test.bot
@ 2026-02-03 8:55 ` Paul Menzel
2026-02-11 19:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2026-02-03 8:55 UTC (permalink / raw)
To: Dongyang Jin; +Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel
Dear Dongyang,
Thank you for your patch.
Am 03.02.26 um 08:10 schrieb Dongyang Jin:
> There is no point in having the label since all it does is return the
> value in the 'err' variable. Instead make every goto return directly
> and remove the label.
>
> Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
> ---
> drivers/bluetooth/btbcm.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
> index d33cc70eec66..dccfbeee4721 100644
> --- a/drivers/bluetooth/btbcm.c
> +++ b/drivers/bluetooth/btbcm.c
> @@ -223,7 +223,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
> err = PTR_ERR(skb);
> bt_dev_err(hdev, "BCM: Download Minidrv command failed (%d)",
> err);
> - goto done;
> + return err;
> }
> kfree_skb(skb);
>
> @@ -242,8 +242,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
>
> if (fw_size < cmd->plen) {
> bt_dev_err(hdev, "BCM: Patch is corrupted");
> - err = -EINVAL;
> - goto done;
> + return -EINVAL;
> }
>
> cmd_param = fw_ptr;
> @@ -258,7 +257,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
> err = PTR_ERR(skb);
> bt_dev_err(hdev, "BCM: Patch command %04x failed (%d)",
> opcode, err);
> - goto done;
> + return err;
> }
> kfree_skb(skb);
> }
> @@ -266,8 +265,7 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
> /* 250 msec delay after Launch Ram completes */
> msleep(250);
>
> -done:
> - return err;
> + return 0;
> }
> EXPORT_SYMBOL(btbcm_patchram);
>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
PS: Do you have a device to test *btbcm*?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram
2026-02-03 7:10 [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram Dongyang Jin
2026-02-03 7:48 ` bluez.test.bot
2026-02-03 8:55 ` [PATCH] " Paul Menzel
@ 2026-02-11 19:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2026-02-11 19:40 UTC (permalink / raw)
To: Dongyang Jin; +Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 3 Feb 2026 15:10:48 +0800 you wrote:
> There is no point in having the label since all it does is return the
> value in the 'err' variable. Instead make every goto return directly
> and remove the label.
>
> Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
> ---
> drivers/bluetooth/btbcm.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
Here is the summary with links:
- Bluetooth: btbcm: remove done label in btbcm_patchram
https://git.kernel.org/bluetooth/bluetooth-next/c/7351872d71d8
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:[~2026-02-11 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 7:10 [PATCH] Bluetooth: btbcm: remove done label in btbcm_patchram Dongyang Jin
2026-02-03 7:48 ` bluez.test.bot
2026-02-03 8:55 ` [PATCH] " Paul Menzel
2026-02-11 19:40 ` 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