Skip to content

Commit 23004f3

Browse files
Marco Cesatigregkh
authored andcommitted
staging: rtl8723bs: remove typedefs in rtl8723b_hal.h
This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs torvalds#173: FILE: include/rtl8723b_hal.h:173: +typedef enum _C2H_EVT { WARNING: do not add new typedefs torvalds#189: FILE: include/rtl8723b_hal.h:189: +typedef struct _C2H_EVT_HDR { WARNING: do not add new typedefs torvalds#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>
1 parent f30c262 commit 23004f3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,7 +3706,7 @@ s32 c2h_handler_8723b(struct adapter *padapter, u8 *buf)
37063706
return ret;
37073707
}
37083708

3709-
static void process_c2h_event(struct adapter *padapter, PC2H_EVT_HDR pC2hEvent, u8 *c2hBuf)
3709+
static void process_c2h_event(struct adapter *padapter, struct C2H_EVT_HDR *pC2hEvent, u8 *c2hBuf)
37103710
{
37113711
u8 index = 0;
37123712

@@ -3750,7 +3750,7 @@ static void process_c2h_event(struct adapter *padapter, PC2H_EVT_HDR pC2hEvent,
37503750

37513751
void C2HPacketHandler_8723B(struct adapter *padapter, u8 *pbuffer, u16 length)
37523752
{
3753-
C2H_EVT_HDR C2hEvent;
3753+
struct C2H_EVT_HDR C2hEvent;
37543754
u8 *tmpBuf = NULL;
37553755
#ifdef CONFIG_WOWLAN
37563756
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);

drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)
349349
RT_TRACE(_module_rtl871x_recv_c_, _drv_dump_, ("%s: rtw_recv_entry(precvframe) != _SUCCESS\n", __func__));
350350
}
351351
} else if (pattrib->pkt_rpt_type == C2H_PACKET) {
352-
C2H_EVT_HDR C2hEvent;
352+
struct C2H_EVT_HDR C2hEvent;
353353

354354
u16 len_c2h = pattrib->pkt_len;
355355
u8 *pbuf_c2h = precvframe->u.hdr.rx_data;

drivers/staging/rtl8723bs/include/rtl8723b_hal.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ struct rt_firmware_hdr {
170170
/* Description: Determine the types of C2H events that are the same in driver
171171
* and FW; First constructed by tynli. 2009.10.09.
172172
*/
173-
typedef enum _C2H_EVT {
173+
enum C2H_EVT {
174174
C2H_DBG = 0,
175175
C2H_TSF = 1,
176176
C2H_AP_RPT_RSP = 2,
@@ -184,21 +184,21 @@ typedef enum _C2H_EVT {
184184
C2H_HW_INFO_EXCH = 10,
185185
C2H_8723B_BT_MP_INFO = 11,
186186
MAX_C2HEVENT
187-
} C2H_EVT;
187+
};
188188

189-
typedef struct _C2H_EVT_HDR {
189+
struct C2H_EVT_HDR {
190190
u8 CmdID;
191191
u8 CmdLen;
192192
u8 CmdSeq;
193-
} __attribute__((__packed__)) C2H_EVT_HDR, *PC2H_EVT_HDR;
193+
} __attribute__((__packed__));
194194

195-
typedef enum tag_Package_Definition {
195+
enum PACKAGE_TYPE_E { /* tag_Package_Definition */
196196
PACKAGE_DEFAULT,
197197
PACKAGE_QFN68,
198198
PACKAGE_TFBGA90,
199199
PACKAGE_TFBGA80,
200200
PACKAGE_TFBGA79
201-
} PACKAGE_TYPE_E;
201+
};
202202

203203
#define INCLUDE_MULTI_FUNC_BT(_Adapter) \
204204
(GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT)

0 commit comments

Comments
 (0)