* [PATCH 1/4] staging: rtl8188eu: change array type to const u8
@ 2018-10-04 17:56 Michael Straube
2018-10-04 17:56 ` [PATCH 2/4] staging: rtl8188eu: make struct field of mlme_handler const Michael Straube
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2018-10-04 17:56 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Change the type of MCS_rate_1R from unsigned char to const u8.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
NOTE:
This series depends on the previous sent series.
[1/3] staging: rtl8188eu: fix line over 80 characters - style
drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8188eu/include/rtw_mlme.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 858b597cb506..6302be43c2e0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -20,7 +20,7 @@
#include <rtw_ioctl_set.h>
#include <linux/vmalloc.h>
-extern unsigned char MCS_rate_1R[16];
+extern const u8 MCS_rate_1R[16];
int rtw_init_mlme_priv(struct adapter *padapter)
{
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index c6945164ee34..6790b840aef8 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -39,7 +39,7 @@ extern unsigned char REALTEK_96B_IE[];
/********************************************************
MCS rate definitions
*********************************************************/
-unsigned char MCS_rate_1R[16] = {
+const u8 MCS_rate_1R[16] = {
0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 49d23aef47df..8d9d663f0645 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -214,7 +214,7 @@ void hostapd_mode_unload(struct adapter *padapter);
extern unsigned char WPA_TKIP_CIPHER[4];
extern unsigned char RSN_TKIP_CIPHER[4];
extern unsigned char REALTEK_96B_IE[];
-extern unsigned char MCS_rate_1R[16];
+extern const u8 MCS_rate_1R[16];
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf);
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf);
--
2.19.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] staging: rtl8188eu: make struct field of mlme_handler const
2018-10-04 17:56 [PATCH 1/4] staging: rtl8188eu: change array type to const u8 Michael Straube
@ 2018-10-04 17:56 ` Michael Straube
2018-10-04 17:56 ` [PATCH 3/4] staging: rtl8188eu: make struct field of action_handler const Michael Straube
2018-10-04 17:57 ` [PATCH 4/4] staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2018-10-04 17:56 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
The strings in the uses of struct mlme_handler are constant.
Change the type of field str from 'char *' to 'const char *'.
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
index ade68af15e04..3e8a0ab46ff2 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -232,7 +232,7 @@ enum SCAN_STATE {
struct mlme_handler {
unsigned int num;
- char *str;
+ const char *str;
unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame);
};
--
2.19.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] staging: rtl8188eu: make struct field of action_handler const
2018-10-04 17:56 [PATCH 1/4] staging: rtl8188eu: change array type to const u8 Michael Straube
2018-10-04 17:56 ` [PATCH 2/4] staging: rtl8188eu: make struct field of mlme_handler const Michael Straube
@ 2018-10-04 17:56 ` Michael Straube
2018-10-04 17:57 ` [PATCH 4/4] staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2018-10-04 17:56 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
The strings in the use of struct action_handler are constant.
Change the type of field str from 'char *' to 'const char *'.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
index 3e8a0ab46ff2..38911a7daa95 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -238,7 +238,7 @@ struct mlme_handler {
struct action_handler {
unsigned int num;
- char *str;
+ const char *str;
unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame);
};
--
2.19.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h
2018-10-04 17:56 [PATCH 1/4] staging: rtl8188eu: change array type to const u8 Michael Straube
2018-10-04 17:56 ` [PATCH 2/4] staging: rtl8188eu: make struct field of mlme_handler const Michael Straube
2018-10-04 17:56 ` [PATCH 3/4] staging: rtl8188eu: make struct field of action_handler const Michael Straube
@ 2018-10-04 17:57 ` Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2018-10-04 17:57 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Straube
Remove spaces and/or replace tabs with spaces in some declarations
in rtw_mlme_ext.h.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
index 38911a7daa95..9526da3efcc4 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -231,22 +231,22 @@ enum SCAN_STATE {
};
struct mlme_handler {
- unsigned int num;
+ unsigned int num;
const char *str;
unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame);
};
struct action_handler {
- unsigned int num;
+ unsigned int num;
const char *str;
unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame);
};
-struct ss_res {
- int state;
- int bss_cnt;
- int channel_idx;
- int scan_mode;
+struct ss_res {
+ int state;
+ int bss_cnt;
+ int channel_idx;
+ int scan_mode;
u8 ssid_num;
u8 ch_num;
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
--
2.19.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-04 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 17:56 [PATCH 1/4] staging: rtl8188eu: change array type to const u8 Michael Straube
2018-10-04 17:56 ` [PATCH 2/4] staging: rtl8188eu: make struct field of mlme_handler const Michael Straube
2018-10-04 17:56 ` [PATCH 3/4] staging: rtl8188eu: make struct field of action_handler const Michael Straube
2018-10-04 17:57 ` [PATCH 4/4] staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h Michael Straube
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).