lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: rtl8192e: fix array of flexible structures
Date
This patch fixes sparse warning "array of flexible structures"
for rtllib.h.

eg. drivers/staging/rtl8192e/rtllib.h:832:48: warning: array of
flexible structures

Signed-off-by: Jitendra Khasdev <jkhasdev@gmail.com>
---
drivers/staging/rtl8192e/rtllib.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 4cabaf2..c7cb318 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -802,7 +802,7 @@ struct rtllib_authentication {
__le16 transaction;
__le16 status;
/*challenge*/
- struct rtllib_info_element info_element[];
+ struct rtllib_info_element *info_element;
} __packed;

struct rtllib_disauth {
@@ -818,7 +818,7 @@ struct rtllib_disassoc {
struct rtllib_probe_request {
struct rtllib_hdr_3addr header;
/* SSID, supported rates */
- struct rtllib_info_element info_element[];
+ struct rtllib_info_element *info_element;
} __packed;

struct rtllib_probe_response {
@@ -829,7 +829,7 @@ struct rtllib_probe_response {
/* SSID, supported rates, FH params, DS params,
* CF params, IBSS params, TIM (if beacon), RSN
*/
- struct rtllib_info_element info_element[];
+ struct rtllib_info_element *info_element;
} __packed;

/* Alias beacon for probe_response */
@@ -840,7 +840,7 @@ struct rtllib_assoc_request_frame {
__le16 capability;
__le16 listen_interval;
/* SSID, supported rates, RSN */
- struct rtllib_info_element info_element[];
+ struct rtllib_info_element *info_element;
} __packed;

struct rtllib_assoc_response_frame {
@@ -848,7 +848,7 @@ struct rtllib_assoc_response_frame {
__le16 capability;
__le16 status;
__le16 aid;
- struct rtllib_info_element info_element[]; /* supported rates */
+ struct rtllib_info_element *info_element; /* supported rates */
} __packed;

struct rtllib_txb {
--
1.8.3.1
\
 
 \ /
  Last update: 2021-04-27 19:50    [W:0.066 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site