staging: rtl8723bs: remove typedefs in rtl8723b_hal.h
authorMarco Cesati <marcocesati@gmail.com>
Fri, 12 Mar 2021 08:26:27 +0000 (09:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 16:25:41 +0000 (17:25 +0100)
This commit fixes the following checkpatch.pl warnings:

    WARNING: do not add new typedefs
    #173: FILE: include/rtl8723b_hal.h:173:
    +typedef enum _C2H_EVT {

    WARNING: do not add new typedefs
    #189: FILE: include/rtl8723b_hal.h:189:
    +typedef struct _C2H_EVT_HDR {

    WARNING: do not add new typedefs
    #195: FILE: include/rtl8723b_hal.h:195:
    +typedef enum tag_Package_Definition {

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-23-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
drivers/staging/rtl8723bs/include/rtl8723b_hal.h

index 55c95b3..8d4b871 100644 (file)
@@ -3706,7 +3706,7 @@ exit:
        return ret;
 }
 
-static void process_c2h_event(struct adapter *padapter, PC2H_EVT_HDR pC2hEvent, u8 *c2hBuf)
+static void process_c2h_event(struct adapter *padapter, struct C2H_EVT_HDR *pC2hEvent, u8 *c2hBuf)
 {
        u8 index = 0;
 
@@ -3750,7 +3750,7 @@ static void process_c2h_event(struct adapter *padapter, PC2H_EVT_HDR pC2hEvent,
 
 void C2HPacketHandler_8723B(struct adapter *padapter, u8 *pbuffer, u16 length)
 {
-       C2H_EVT_HDR     C2hEvent;
+       struct C2H_EVT_HDR      C2hEvent;
        u8 *tmpBuf = NULL;
 #ifdef CONFIG_WOWLAN
        struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
index 2d15a5f..415e519 100644 (file)
@@ -349,7 +349,7 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)
                                                RT_TRACE(_module_rtl871x_recv_c_, _drv_dump_, ("%s: rtw_recv_entry(precvframe) != _SUCCESS\n", __func__));
                                        }
                                } else if (pattrib->pkt_rpt_type == C2H_PACKET) {
-                                       C2H_EVT_HDR     C2hEvent;
+                                       struct C2H_EVT_HDR      C2hEvent;
 
                                        u16 len_c2h = pattrib->pkt_len;
                                        u8 *pbuf_c2h = precvframe->u.hdr.rx_data;
index 8e6e972..03024ee 100644 (file)
@@ -170,7 +170,7 @@ struct rt_firmware_hdr {
 /* Description: Determine the types of C2H events that are the same in driver
  * and FW; First constructed by tynli. 2009.10.09.
  */
-typedef enum _C2H_EVT {
+enum C2H_EVT {
        C2H_DBG = 0,
        C2H_TSF = 1,
        C2H_AP_RPT_RSP = 2,
@@ -184,21 +184,21 @@ typedef enum _C2H_EVT {
        C2H_HW_INFO_EXCH = 10,
        C2H_8723B_BT_MP_INFO = 11,
        MAX_C2HEVENT
-} C2H_EVT;
+};
 
-typedef struct _C2H_EVT_HDR {
+struct C2H_EVT_HDR {
        u8 CmdID;
        u8 CmdLen;
        u8 CmdSeq;
-} __attribute__((__packed__)) C2H_EVT_HDR, *PC2H_EVT_HDR;
+} __attribute__((__packed__));
 
-typedef enum tag_Package_Definition {
+enum PACKAGE_TYPE_E { /* tag_Package_Definition */
        PACKAGE_DEFAULT,
        PACKAGE_QFN68,
        PACKAGE_TFBGA90,
        PACKAGE_TFBGA80,
        PACKAGE_TFBGA79
-} PACKAGE_TYPE_E;
+};
 
 #define INCLUDE_MULTI_FUNC_BT(_Adapter)  \
        (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT)