linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array
@ 2021-04-10  2:19 Qiheng Lin
  2021-04-10  3:26 ` [-next] " bluez.test.bot
  2021-04-11 11:52 ` [PATCH -next] " Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Qiheng Lin @ 2021-04-10  2:19 UTC (permalink / raw)
  To: davem, kuba
  Cc: marcel, johan.hedberg, luiz.dentz, linux-bluetooth, netdev,
	linux-kernel, Qiheng Lin

Fix the following coccicheck warning:

net/bluetooth/msft.c:37:6-13: WARNING use flexible-array member instead
net/bluetooth/msft.c:42:6-10: WARNING use flexible-array member instead
net/bluetooth/msft.c:52:6-10: WARNING use flexible-array member instead

Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---
 net/bluetooth/msft.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/msft.c b/net/bluetooth/msft.c
index e28f15439ce4..37a394786a94 100644
--- a/net/bluetooth/msft.c
+++ b/net/bluetooth/msft.c
@@ -34,12 +34,12 @@ struct msft_le_monitor_advertisement_pattern {
 	__u8 length;
 	__u8 data_type;
 	__u8 start_byte;
-	__u8 pattern[0];
+	__u8 pattern[];
 };
 
 struct msft_le_monitor_advertisement_pattern_data {
 	__u8 count;
-	__u8 data[0];
+	__u8 data[];
 };
 
 struct msft_cp_le_monitor_advertisement {
@@ -49,7 +49,7 @@ struct msft_cp_le_monitor_advertisement {
 	__u8 rssi_low_interval;
 	__u8 rssi_sampling_period;
 	__u8 cond_type;
-	__u8 data[0];
+	__u8 data[];
 } __packed;
 
 struct msft_rp_le_monitor_advertisement {
-- 
2.31.1


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

* RE: [-next] Bluetooth: use flexible-array member instead of zero-length array
  2021-04-10  2:19 [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array Qiheng Lin
@ 2021-04-10  3:26 ` bluez.test.bot
  2021-04-11 11:52 ` [PATCH -next] " Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-04-10  3:26 UTC (permalink / raw)
  To: linux-bluetooth, linqiheng

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

---Test result---

##############################
Test: CheckPatch - PASS


##############################
Test: CheckGitLint - PASS


##############################
Test: CheckBuildK - PASS


##############################
Test: CheckTestRunner: Setup - PASS


##############################
Test: CheckTestRunner: l2cap-tester - PASS
Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6

##############################
Test: CheckTestRunner: bnep-tester - PASS
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: mgmt-tester - FAIL
Total: 416, Passed: 396 (95.2%), Failed: 6, Not Run: 14

Failed Test Cases
Set connectable off (LE) - Success 2                 Failed       0.024 seconds
Set connectable off (LE) - Success 3                 Failed       0.019 seconds
Set connectable off (LE) - Success 4                 Failed       0.030 seconds
Add Advertising - Success 13 (ADV_SCAN_IND)          Failed       0.018 seconds
Add Advertising - Success 14 (ADV_NONCONN_IND)       Failed       0.018 seconds
Add Advertising - Success 17 (Connectable -> off)    Failed       0.020 seconds

##############################
Test: CheckTestRunner: rfcomm-tester - PASS
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: sco-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: smp-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0

##############################
Test: CheckTestRunner: userchan-tester - PASS
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0



---
Regards,
Linux Bluetooth


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

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

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

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

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

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

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

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

* Re: [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array
  2021-04-10  2:19 [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array Qiheng Lin
  2021-04-10  3:26 ` [-next] " bluez.test.bot
@ 2021-04-11 11:52 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-04-11 11:52 UTC (permalink / raw)
  To: Qiheng Lin
  Cc: David S. Miller, Jakub Kicinski, Johan Hedberg,
	Luiz Augusto von Dentz, linux-bluetooth, netdev, linux-kernel

Hi Qiheng,

> Fix the following coccicheck warning:
> 
> net/bluetooth/msft.c:37:6-13: WARNING use flexible-array member instead
> net/bluetooth/msft.c:42:6-10: WARNING use flexible-array member instead
> net/bluetooth/msft.c:52:6-10: WARNING use flexible-array member instead
> 
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
> ---
> net/bluetooth/msft.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

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-04-11 11:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10  2:19 [PATCH -next] Bluetooth: use flexible-array member instead of zero-length array Qiheng Lin
2021-04-10  3:26 ` [-next] " bluez.test.bot
2021-04-11 11:52 ` [PATCH -next] " 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).