staging: rtl8723bs: Remove rtw_hal_c2h_evt_read()
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 28 Jun 2019 10:58:32 +0000 (16:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2019 08:49:44 +0000 (10:49 +0200)
Modify call sites of rtw_hal_c2h_evt_read to call c2h_evt_read_88xx
instead, as rtw_hal_c2h_evt_read does nothing except call
c2h_evt_read_88xx.
Remove function rtw_hal_c2h_evt_read as it is now not necessary.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/hal/hal_intf.c
drivers/staging/rtl8723bs/hal/sdio_ops.c
drivers/staging/rtl8723bs/include/hal_intf.h

index 988e909a5124359ca0442b8959eec70971e1bae6..55a481f9d441b2f12209af772524c585e4609e26 100644 (file)
@@ -1918,7 +1918,7 @@ static void c2h_wk_callback(_workitem *work)
                        c2h_evt = rtw_malloc(16);
                        if (c2h_evt != NULL) {
                                /* This C2H event is not read, read & clear now */
-                               if (rtw_hal_c2h_evt_read(adapter, c2h_evt) != _SUCCESS) {
+                               if (c2h_evt_read_88xx(adapter, c2h_evt) != _SUCCESS) {
                                        kfree(c2h_evt);
                                        continue;
                                }
index 4a4d17b44ba63a5f87c222374bfaa82949fe3421..acb25978a46c39053beede1553e7752b9cacb953 100644 (file)
@@ -400,11 +400,6 @@ bool rtw_hal_c2h_valid(struct adapter *adapter, u8 *buf)
        return c2h_evt_valid((struct c2h_evt_hdr_88xx *)buf);
 }
 
-s32 rtw_hal_c2h_evt_read(struct adapter *adapter, u8 *buf)
-{
-       return c2h_evt_read_88xx(adapter, buf);
-}
-
 s32 rtw_hal_c2h_handler(struct adapter *adapter, u8 *c2h_evt)
 {
        s32 ret = _FAIL;
index 82e249e7fbb464b664b455b63c4ec0c8885e164e..301d327d062449dfd650a6198bcee77e3f69dd67 100644 (file)
@@ -1025,7 +1025,7 @@ void sd_int_dpc(struct adapter *adapter)
                DBG_8192C("%s: C2H Command\n", __func__);
                c2h_evt = rtw_zmalloc(16);
                if (c2h_evt) {
-                       if (rtw_hal_c2h_evt_read(adapter, (u8 *)c2h_evt) == _SUCCESS) {
+                       if (c2h_evt_read_88xx(adapter, (u8 *)c2h_evt) == _SUCCESS) {
                                if (c2h_id_filter_ccx_8723b((u8 *)c2h_evt)) {
                                        /* Handle CCX report here */
                                        rtw_hal_c2h_handler(adapter, (u8 *)c2h_evt);
index 19ceb4aa753ea6a2c51c2ca69411b7044bef60c2..3a0c3d079d507c9ba22a7f2480013dde0f00f98e 100644 (file)
@@ -388,7 +388,6 @@ void rtw_hal_notch_filter(struct adapter * adapter, bool enable);
 void rtw_hal_reset_security_engine(struct adapter * adapter);
 
 bool rtw_hal_c2h_valid(struct adapter *adapter, u8 *buf);
-s32 rtw_hal_c2h_evt_read(struct adapter *adapter, u8 *buf);
 s32 rtw_hal_c2h_handler(struct adapter *adapter, u8 *c2h_evt);
 c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter);