netdev.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-11 11:52 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ 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] 2+ 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-11 11:52 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ 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] 2+ messages in thread

end of thread, other threads:[~2021-04-11 11:52 UTC | newest]

Thread overview: 2+ 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-11 11:52 ` 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).