staging: r8188eu: Fix cast between incompatible function type
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Wed, 4 Aug 2021 14:32:18 +0000 (16:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Aug 2021 11:08:23 +0000 (13:08 +0200)
Fix sparse warnings of casts between incompatible function
types from ‘void (*)(void *)’ to ‘void (*)(long unsigned int)’
[-Wcast-function-type].

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210804143218.13665-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188eu_recv.c
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
drivers/staging/r8188eu/hal/usb_ops_linux.c
drivers/staging/r8188eu/include/rtl8188e_recv.h
drivers/staging/r8188eu/include/rtl8188e_xmit.h

index d0102b002fd22e318773eb8b947451723d636b58..8535d3d1e3d8f819cec909f480c2757ade5a85c6 100644 (file)
@@ -38,7 +38,7 @@ int   rtl8188eu_init_recv_priv(struct adapter *padapter)
        struct recv_buf *precvbuf;
 
        tasklet_init(&precvpriv->recv_tasklet,
-                    (void(*)(unsigned long))rtl8188eu_recv_tasklet,
+                    rtl8188eu_recv_tasklet,
                     (unsigned long)padapter);
 
        /* init recv_buf */
index 900ae24c504a5f68fc34a0120bf212500b8ffc43..e4aa0b3bc7b7406478bc7506564f80a3ef17613e 100644 (file)
@@ -14,7 +14,7 @@ s32   rtl8188eu_init_xmit_priv(struct adapter *adapt)
        struct xmit_priv        *pxmitpriv = &adapt->xmitpriv;
 
        tasklet_init(&pxmitpriv->xmit_tasklet,
-                    (void(*)(unsigned long))rtl8188eu_xmit_tasklet,
+                    rtl8188eu_xmit_tasklet,
                     (unsigned long)adapt);
        return _SUCCESS;
 }
index 650dba9bd38c98237aef37d88724f006ab1b6f61..80d44aafd8ea4e2da2c3812e9c6213ff4a4fcc64 100644 (file)
@@ -449,7 +449,7 @@ _exit_recvbuf2recvframe:
        return _SUCCESS;
 }
 
-void rtl8188eu_recv_tasklet(void *priv)
+void rtl8188eu_recv_tasklet(unsigned long priv)
 {
        struct sk_buff *pskb;
        struct adapter *adapt = (struct adapter *)priv;
@@ -617,7 +617,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
        return ret;
 }
 
-void rtl8188eu_xmit_tasklet(void *priv)
+void rtl8188eu_xmit_tasklet(unsigned long priv)
 {
        int ret = false;
        struct adapter *adapt = (struct adapter *)priv;
index bc1d532592b900d4637f119757af6a784ed861ba..a91daf84d6c3860cc3f30982771779f8151d4b8a 100644 (file)
@@ -44,7 +44,7 @@ void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *buf);
 s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
 void rtl8188eu_free_recv_priv(struct adapter * padapter);
 void rtl8188eu_recv_hdl(struct adapter * padapter, struct recv_buf *precvbuf);
-void rtl8188eu_recv_tasklet(void *priv);
+void rtl8188eu_recv_tasklet(unsigned long priv);
 void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy);
 void rtl8188e_process_phy_info(struct adapter * padapter, void *prframe);
 void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
index 95fb1ca69d469f2e4f811f56f722875badceb969..ff8b73441c52542b3a14ddcd5726cf7f80b0d991 100644 (file)
@@ -145,7 +145,7 @@ s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
 #define hal_xmit_handler rtl8188eu_xmit_buf_handler
-void rtl8188eu_xmit_tasklet(void *priv);
+void rtl8188eu_xmit_tasklet(unsigned long priv);
 s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
                                 struct xmit_priv *pxmitpriv,
                                 struct xmit_buf *pxmitbuf);