Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btmrvl: Slightly simplify btmrvl_process_event()
@ 2026-08-09 12:59 Christophe JAILLET
  2026-08-09 14:02 ` bluez.test.bot
  2026-08-11 20:10 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2026-08-09 12:59 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
	linux-bluetooth

In btmrvl_process_event(), all error handling paths except one do a direct
return. Update the only one that makes a goto to be consistent.

This does not change the behavior because ret is known to be != 0 when
'exit' is reached.

This simplifies the code, saves 2 LoC and pleases one of my coccinelle
script that tries to spot erroneously mixed goto and return statements.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/bluetooth/btmrvl_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index e25930351f64..d449fbdde464 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -87,8 +87,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
 	event = (struct btmrvl_event *) skb->data;
 	if (event->ec != 0xff) {
 		BT_DBG("Not Marvell Event=%x", event->ec);
-		ret = -EINVAL;
-		goto exit;
+		return -EINVAL;
 	}
 
 	switch (event->data[0]) {
@@ -165,7 +164,6 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
 		break;
 	}
 
-exit:
 	if (!ret)
 		kfree_skb(skb);
 
-- 
2.55.0


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

* RE: Bluetooth: btmrvl: Slightly simplify btmrvl_process_event()
  2026-08-09 12:59 [PATCH] Bluetooth: btmrvl: Slightly simplify btmrvl_process_event() Christophe JAILLET
@ 2026-08-09 14:02 ` bluez.test.bot
  2026-08-11 20:10 ` [PATCH] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-08-09 14:02 UTC (permalink / raw)
  To: linux-bluetooth, christophe.jaillet

[-- Attachment #1: Type: text/plain, Size: 1181 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=1142910

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
VerifyFixes                   PASS      0.08 seconds
VerifySignedoff               PASS      0.09 seconds
GitLint                       PASS      0.22 seconds
SubjectPrefix                 PASS      0.08 seconds
BuildKernel                   PASS      20.64 seconds
CheckAllWarning               PASS      22.92 seconds
CheckSparse                   PASS      22.71 seconds
BuildKernel32                 PASS      21.69 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      373.38 seconds
IncrementalBuild              PASS      21.26 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found


https://github.com/bluez/bluetooth-next/pull/562

---
Regards,
Linux Bluetooth


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

* Re: [PATCH] Bluetooth: btmrvl: Slightly simplify btmrvl_process_event()
  2026-08-09 12:59 [PATCH] Bluetooth: btmrvl: Slightly simplify btmrvl_process_event() Christophe JAILLET
  2026-08-09 14:02 ` bluez.test.bot
@ 2026-08-11 20:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-08-11 20:10 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: marcel, luiz.dentz, linux-kernel, kernel-janitors,
	linux-bluetooth

Hello:

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

On Sun,  9 Aug 2026 14:59:59 +0200 you wrote:
> In btmrvl_process_event(), all error handling paths except one do a direct
> return. Update the only one that makes a goto to be consistent.
> 
> This does not change the behavior because ret is known to be != 0 when
> 'exit' is reached.
> 
> This simplifies the code, saves 2 LoC and pleases one of my coccinelle
> script that tries to spot erroneously mixed goto and return statements.
> 
> [...]

Here is the summary with links:
  - Bluetooth: btmrvl: Slightly simplify btmrvl_process_event()
    https://git.kernel.org/bluetooth/bluetooth-next/c/b2d457736260

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] 3+ messages in thread

end of thread, other threads:[~2026-08-11 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-09 12:59 [PATCH] Bluetooth: btmrvl: Slightly simplify btmrvl_process_event() Christophe JAILLET
2026-08-09 14:02 ` bluez.test.bot
2026-08-11 20:10 ` [PATCH] " 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