linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Fix application of sizeof to pointer
@ 2021-10-13  0:56 davidcomponentone
  2021-10-13  2:08 ` [v2] " bluez.test.bot
  2021-10-13  6:37 ` [PATCH v2] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: davidcomponentone @ 2021-10-13  0:56 UTC (permalink / raw)
  To: marcel
  Cc: johan.hedberg, luiz.dentz, linux-bluetooth, linux-kernel,
	David Yang, Zeal Robot

From: David Yang <davidcomponentone@gmail.com>

The coccinelle check report:
"./drivers/bluetooth/btusb.c:2239:36-42:
ERROR: application of sizeof to pointer".
Using the real size to fix it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 75c83768c257..3e26f60b457e 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2236,7 +2236,7 @@ static int btusb_set_bdaddr_mtk(struct hci_dev *hdev, const bdaddr_t *bdaddr)
 	struct sk_buff *skb;
 	long ret;
 
-	skb = __hci_cmd_sync(hdev, 0xfc1a, sizeof(bdaddr), bdaddr, HCI_INIT_TIMEOUT);
+	skb = __hci_cmd_sync(hdev, 0xfc1a, 6, bdaddr, HCI_INIT_TIMEOUT);
 	if (IS_ERR(skb)) {
 		ret = PTR_ERR(skb);
 		bt_dev_err(hdev, "changing Mediatek device address failed (%ld)",
-- 
2.30.2


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

* RE: [v2] Fix application of sizeof to pointer
  2021-10-13  0:56 [PATCH v2] Fix application of sizeof to pointer davidcomponentone
@ 2021-10-13  2:08 ` bluez.test.bot
  2021-10-13  6:37 ` [PATCH v2] " Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-10-13  2:08 UTC (permalink / raw)
  To: linux-bluetooth, davidcomponentone

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

---Test result---

Test Summary:
CheckPatch                    PASS      1.78 seconds
GitLint                       PASS      0.90 seconds
BuildKernel                   PASS      527.64 seconds
TestRunner: Setup             PASS      387.39 seconds
TestRunner: l2cap-tester      PASS      8.76 seconds
TestRunner: bnep-tester       PASS      4.81 seconds
TestRunner: mgmt-tester       PASS      84.98 seconds
TestRunner: rfcomm-tester     PASS      5.90 seconds
TestRunner: sco-tester        PASS      6.13 seconds
TestRunner: smp-tester        PASS      5.98 seconds
TestRunner: userchan-tester   PASS      5.05 seconds



---
Regards,
Linux Bluetooth


[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 44357 bytes --]

[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3563 bytes --]

[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 646011 bytes --]

[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11683 bytes --]

[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 13924 bytes --]

[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11830 bytes --]

[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 6372 bytes --]

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

* Re: [PATCH v2] Fix application of sizeof to pointer
  2021-10-13  0:56 [PATCH v2] Fix application of sizeof to pointer davidcomponentone
  2021-10-13  2:08 ` [v2] " bluez.test.bot
@ 2021-10-13  6:37 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-10-13  6:37 UTC (permalink / raw)
  To: davidcomponentone
  Cc: Johan Hedberg, Luiz Augusto von Dentz, linux-bluetooth,
	Linux Kernel Mailing List, Zeal Robot

Hi David,

> The coccinelle check report:
> "./drivers/bluetooth/btusb.c:2239:36-42:
> ERROR: application of sizeof to pointer".
> Using the real size to fix it.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: David Yang <davidcomponentone@gmail.com>
> ---
> drivers/bluetooth/btusb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

end of thread, other threads:[~2021-10-13  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13  0:56 [PATCH v2] Fix application of sizeof to pointer davidcomponentone
2021-10-13  2:08 ` [v2] " bluez.test.bot
2021-10-13  6:37 ` [PATCH v2] " Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).