* [PATCH btusb] Fix application of sizeof to pointer
@ 2021-10-12 2:01 davidcomponentone
2021-10-12 3:14 ` [btusb] " bluez.test.bot
2021-10-12 15:51 ` [PATCH btusb] " Marcel Holtmann
0 siblings, 2 replies; 3+ messages in thread
From: davidcomponentone @ 2021-10-12 2:01 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 "sizeof(bdaddr_t)" 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..ecc56723aa5f 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, sizeof(bdaddr_t), 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: [btusb] Fix application of sizeof to pointer
2021-10-12 2:01 [PATCH btusb] Fix application of sizeof to pointer davidcomponentone
@ 2021-10-12 3:14 ` bluez.test.bot
2021-10-12 15:51 ` [PATCH btusb] " Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-10-12 3:14 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=561471
---Test result---
Test Summary:
CheckPatch PASS 1.55 seconds
GitLint PASS 0.91 seconds
BuildKernel PASS 522.10 seconds
TestRunner: Setup PASS 383.26 seconds
TestRunner: l2cap-tester PASS 8.54 seconds
TestRunner: bnep-tester PASS 4.77 seconds
TestRunner: mgmt-tester PASS 84.46 seconds
TestRunner: rfcomm-tester PASS 5.91 seconds
TestRunner: sco-tester PASS 6.15 seconds
TestRunner: smp-tester PASS 6.07 seconds
TestRunner: userchan-tester PASS 5.18 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: 3564 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 646011 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11684 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 13923 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 btusb] Fix application of sizeof to pointer
2021-10-12 2:01 [PATCH btusb] Fix application of sizeof to pointer davidcomponentone
2021-10-12 3:14 ` [btusb] " bluez.test.bot
@ 2021-10-12 15:51 ` Marcel Holtmann
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-10-12 15:51 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 "sizeof(bdaddr_t)" 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..ecc56723aa5f 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, sizeof(bdaddr_t), bdaddr, HCI_INIT_TIMEOUT);
in a different review, I said, just use 6 as all the other drivers do.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-12 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 2:01 [PATCH btusb] Fix application of sizeof to pointer davidcomponentone
2021-10-12 3:14 ` [btusb] " bluez.test.bot
2021-10-12 15:51 ` [PATCH btusb] " Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.