public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/hfp: Fix issues found by codacy
@ 2025-10-02 16:11 Frédéric Danis
  2025-10-02 17:53 ` [BlueZ] " bluez.test.bot
  2025-10-09 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2025-10-02 16:11 UTC (permalink / raw)
  To: linux-bluetooth

Move debug string after check of hfp pointer.
Add missing argument in debug trace.
---
 src/shared/hfp.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 133bff248..94adccada 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -2391,11 +2391,11 @@ bool hfp_hf_session_register(struct hfp_hf *hfp,
 
 bool hfp_hf_session(struct hfp_hf *hfp)
 {
-	DBG(hfp, "");
-
 	if (!hfp)
 		return false;
 
+	DBG(hfp, "");
+
 	if (!hfp_hf_register(hfp, slc_brsf_cb, "+BRSF", hfp, NULL))
 		return false;
 
@@ -2407,15 +2407,15 @@ const char *hfp_hf_call_get_number(struct hfp_hf *hfp, uint id)
 {
 	struct hf_call *call;
 
-	DBG(hfp, "");
-
 	if (!hfp)
-		return false;
+		return NULL;
+
+	DBG(hfp, "");
 
 	call = queue_find(hfp->calls, call_id_match, UINT_TO_PTR(id));
 	if (!call) {
 		DBG(hfp, "hf: no call with id: %u", id);
-		return false;
+		return NULL;
 	}
 
 	return call->line_id;
@@ -2427,11 +2427,11 @@ bool hfp_hf_call_answer(struct hfp_hf *hfp, uint id,
 {
 	struct hf_call *call;
 
-	DBG(hfp, "");
-
 	if (!hfp)
 		return false;
 
+	DBG(hfp, "");
+
 	call = queue_find(hfp->calls, call_id_match, UINT_TO_PTR(id));
 	if (!call) {
 		DBG(hfp, "hf: no call with id: %u", id);
@@ -2440,7 +2440,7 @@ bool hfp_hf_call_answer(struct hfp_hf *hfp, uint id,
 
 	if (call->status != CALL_STATUS_INCOMING) {
 		DBG(hfp, "hf: %d not in incoming call state: %u",
-							call->status);
+							id, call->status);
 		return false;
 	}
 
@@ -2453,11 +2453,11 @@ bool hfp_hf_call_hangup(struct hfp_hf *hfp, uint id,
 {
 	struct hf_call *call;
 
-	DBG(hfp, "");
-
 	if (!hfp)
 		return false;
 
+	DBG(hfp, "");
+
 	call = queue_find(hfp->calls, call_id_match, UINT_TO_PTR(id));
 	if (!call) {
 		DBG(hfp, "hf: no call with id: %u", id);
-- 
2.43.0


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

* RE: [BlueZ] shared/hfp: Fix issues found by codacy
  2025-10-02 16:11 [PATCH BlueZ] shared/hfp: Fix issues found by codacy Frédéric Danis
@ 2025-10-02 17:53 ` bluez.test.bot
  2025-10-09 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-10-02 17:53 UTC (permalink / raw)
  To: linux-bluetooth, frederic.danis

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

---Test result---

Test Summary:
CheckPatch                    PENDING   0.93 seconds
GitLint                       PENDING   0.43 seconds
BuildEll                      PASS      20.09 seconds
BluezMake                     PASS      2703.80 seconds
MakeCheck                     PASS      20.15 seconds
MakeDistcheck                 PASS      185.88 seconds
CheckValgrind                 PASS      237.01 seconds
CheckSmatch                   PASS      309.45 seconds
bluezmakeextell               PASS      127.31 seconds
IncrementalBuild              PENDING   0.33 seconds
ScanBuild                     PASS      909.99 seconds

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

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

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ] shared/hfp: Fix issues found by codacy
  2025-10-02 16:11 [PATCH BlueZ] shared/hfp: Fix issues found by codacy Frédéric Danis
  2025-10-02 17:53 ` [BlueZ] " bluez.test.bot
@ 2025-10-09 19:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-10-09 19:40 UTC (permalink / raw)
  To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
  Cc: linux-bluetooth

Hello:

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

On Thu,  2 Oct 2025 18:11:19 +0200 you wrote:
> Move debug string after check of hfp pointer.
> Add missing argument in debug trace.
> ---
>  src/shared/hfp.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)

Here is the summary with links:
  - [BlueZ] shared/hfp: Fix issues found by codacy
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=24c568a3b689

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:[~2025-10-09 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 16:11 [PATCH BlueZ] shared/hfp: Fix issues found by codacy Frédéric Danis
2025-10-02 17:53 ` [BlueZ] " bluez.test.bot
2025-10-09 19:40 ` [PATCH BlueZ] " 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