Skip to contentSkip to conversation

Bluetooth: btmrvl_sdio: Use pointer from memcpy() call for assignment in btmrvl_sdio_host_to_card()

PATCH In review Markus Elfring 2 participants 2 messages Oct 31, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: btmrvl_sdio: Use pointer from memcpy() call for assignment in btmrvl_sdio_host_to_card()

From: Markus Elfring <[email protected]>
Date: Fri, 31 Oct 2025 12:59:00 +0100

A pointer was assigned to a variable. The same pointer was used for the destination parameter of a memcpy() call.
This function is documented in the way that the same value is returned. Thus convert two separate statements into a direct variable assignment for the return value from a memory copy action.

The source code was transformed by using the Coccinelle software.

---
 drivers/bluetooth/btmrvl_sdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bluetooth/btmrvl_sdio.c +2 -2
index 93932a0d8625..3120d2beeaa8 100644
@@ -1111,8 +1111,8 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv,
 		tmpbuf = kzalloc(tmpbufsz, GFP_KERNEL);
 		if (!tmpbuf)
 			return -ENOMEM;
-		buf = (u8 *) ALIGN_ADDR(tmpbuf, BTSDIO_DMA_ALIGN);
-		memcpy(buf, payload, nb);
+
+		buf = memcpy((u8 *)ALIGN_ADDR(tmpbuf, BTSDIO_DMA_ALIGN), payload, nb);
 	}
 
 	sdio_claim_host(card->func);
Signature · 1 line
2.51.1
#1 lore raw

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

---Test result---

Test Summary:

CheckPatch                    PENDING   0.36 seconds
GitLint                       PENDING   0.37 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      25.10 seconds
CheckAllWarning               PASS      27.70 seconds
CheckSparse                   PASS      31.40 seconds
BuildKernel32                 PASS      25.11 seconds
TestRunnerSetup               PASS      497.33 seconds
TestRunner_l2cap-tester       PASS      23.75 seconds
TestRunner_iso-tester         PASS      49.25 seconds
TestRunner_bnep-tester        PASS      6.14 seconds
TestRunner_mgmt-tester        FAIL      113.36 seconds
TestRunner_rfcomm-tester      PASS      9.23 seconds
TestRunner_sco-tester         PASS      14.38 seconds
TestRunner_ioctl-tester       PASS      10.09 seconds
TestRunner_mesh-tester        FAIL      11.43 seconds
TestRunner_smp-tester         PASS      8.53 seconds
TestRunner_userchan-tester    PASS      6.50 seconds
IncrementalBuild              PENDING   0.96 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: 484 (98.8%), Failed: 2, Not Run: 4

Failed Test Cases

Read Exp Feature - Success                           Failed       0.104 seconds
LL Privacy - Add Device 2 (2 Devices to AL)          Failed       0.169 seconds

##############################
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    1.867 seconds
Mesh - Send cancel - 2                               Timed out    1.996 seconds

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

---
Regards,
Linux Bluetooth