summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/usb_ops_linux.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-11-15 09:28:28 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-16 14:41:02 +0100
commit6cfed598480493d814414ce7e53027bd6fc45c49 (patch)
treed70faf7d114efd55fab70df1e589cb3eeeab308e /drivers/staging/rtl8712/usb_ops_linux.c
parent2611045e3555cd0d75837ae69ffd70ef51e28bf7 (diff)
staging: rtl*: Remove tasklet callback casts
In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that the rtl wifi drivers had a bunch of needless function casts. Remove function casts for tasklet callbacks in the various drivers. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/201911150926.2894A4F973@keescook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/usb_ops_linux.c')
-rw-r--r--drivers/staging/rtl8712/usb_ops_linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
index 9d290bc2fdb7..0045da3bb69a 100644
--- a/drivers/staging/rtl8712/usb_ops_linux.c
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
@@ -308,10 +308,10 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
}
}
-void r8712_xmit_bh(void *priv)
+void r8712_xmit_bh(unsigned long priv)
{
int ret = false;
- struct _adapter *padapter = priv;
+ struct _adapter *padapter = (struct _adapter *)priv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
if (padapter->driver_stopped ||