From: Marco Cesati Date: Fri, 12 Mar 2021 08:26:31 +0000 (+0100) Subject: staging: rtl8723bs: remove typedefs in ieee80211.h X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=95cf028829cfc3fba576865136253f4b49d829fb;p=linux.git staging: rtl8723bs: remove typedefs in ieee80211.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #128: FILE: include/ieee80211.h:128: +typedef enum _RATEID_IDX_ { WARNING: do not add new typedefs #142: FILE: include/ieee80211.h:142: +typedef enum _RATR_TABLE_MODE { WARNING: do not add new typedefs #986: FILE: include/ieee80211.h:986: +typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes; Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-27-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index be4cffce4f5d6..a2a97826197a9 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -958,7 +958,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen, * @show_errors: Whether to show parsing errors in debug log * Returns: Parsing result */ -ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, +enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, struct rtw_ieee802_11_elems *elems, int show_errors) { diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h index f80db2c984a4e..10b599f835bb7 100644 --- a/drivers/staging/rtl8723bs/include/ieee80211.h +++ b/drivers/staging/rtl8723bs/include/ieee80211.h @@ -125,7 +125,7 @@ extern u8 RSN_CIPHER_SUITE_CCMP[]; extern u8 RSN_CIPHER_SUITE_WEP104[]; -typedef enum _RATEID_IDX_ { +enum RATEID_IDX { RATEID_IDX_BGN_40M_2SS = 0, RATEID_IDX_BGN_40M_1SS = 1, RATEID_IDX_BGN_20M_2SS_BN = 2, @@ -137,9 +137,9 @@ typedef enum _RATEID_IDX_ { RATEID_IDX_B = 8, RATEID_IDX_VHT_2SS = 9, RATEID_IDX_VHT_1SS = 10, -} RATEID_IDX, *PRATEID_IDX; +}; -typedef enum _RATR_TABLE_MODE { +enum RATR_TABLE_MODE { RATR_INX_WIRELESS_NGB = 0, /* BGN 40 Mhz 2SS 1SS */ RATR_INX_WIRELESS_NG = 1, /* GN or N */ RATR_INX_WIRELESS_NB = 2, /* BGN 20 Mhz 2SS 1SS or BN */ @@ -149,7 +149,7 @@ typedef enum _RATR_TABLE_MODE { RATR_INX_WIRELESS_B = 6, RATR_INX_WIRELESS_MC = 7, RATR_INX_WIRELESS_AC_N = 8, -} RATR_TABLE_MODE, *PRATR_TABLE_MODE; +}; enum NETWORK_TYPE { @@ -983,9 +983,9 @@ struct rtw_ieee802_11_elems { u8 vht_op_mode_notify_len; }; -typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes; +enum ParseRes { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 }; -ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, +enum ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, struct rtw_ieee802_11_elems *elems, int show_errors);