staging: r8188eu: remove c2h_handler field from struct hal_ops
authorPhillip Potter <phil@philpotter.co.uk>
Sun, 29 Aug 2021 23:45:39 +0000 (00:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:42 +0000 (08:49 +0200)
Remove c2h_handler function pointer field from struct hal_ops in
include/hal_intf.h, as it is never set in this driver, and remove
the check for a non-NULL value in the rtw_hal_c2h_handler wrapper
function in hal/hal_intf.c as well. As the function always returns
_FAIL anyway, just modify it to do this unconditionally.

The motivation for removing this field is that it is more code from
the unwanted HAL layer that can be stripped out.

Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Acked-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210829234541.946-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/include/hal_intf.h

index a6d589e89aeb01f171829aa180f0a34f97052baf..0c835f9cd181c93d637400c5762f710e97f53d21 100644 (file)
@@ -428,11 +428,7 @@ void rtw_hal_reset_security_engine(struct adapter *adapter)
 
 s32 rtw_hal_c2h_handler(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt)
 {
-       s32 ret = _FAIL;
-
-       if (adapter->HalFunc.c2h_handler)
-               ret = adapter->HalFunc.c2h_handler(adapter, c2h_evt);
-       return ret;
+       return _FAIL;
 }
 
 c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter)
index fa252540e5960c1ab46e15311752e17f7194bd9e..4603f921203089d73101c4c56ddc25738be7727e 100644 (file)
@@ -251,8 +251,6 @@ struct hal_ops {
 
        void (*hal_notch_filter)(struct adapter *adapter, bool enable);
        void (*hal_reset_security_engine)(struct adapter *adapter);
-       s32 (*c2h_handler)(struct adapter *padapter,
-                          struct c2h_evt_hdr *c2h_evt);
        c2h_id_filter c2h_id_filter_ccx;
 };