staging/rtl8192e: Remove function callback casts
PATCH 1/1 staging/rtl8192e: Remove function callback casts
In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts.
To do this modify the function prototypes accordingly.
Signed-off-by Oscar Carter <[email protected]>
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +13 -11
@@ -81,8 +81,8 @@ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);static void _rtl92e_tx_cmd (struct net_device *dev,struct sk_buff *skb);static short _rtl92e_tx (struct net_device *dev,struct sk_buff *skb);static short _rtl92e_pci_initdescring (struct net_device *dev); -static void _rtl92e_irq_tx_tasklet (struct r8192_priv *priv); -static void _rtl92e_irq_rx_tasklet (struct r8192_priv *priv); +static void _rtl92e_irq_tx_tasklet (unsigned long data); +static void _rtl92e_irq_rx_tasklet (unsigned long data);static void _rtl92e_cancel_deferred_work (struct r8192_priv *priv);static int _rtl92e_up (struct net_device *dev,bool is_silent_reset);static int _rtl92e_try_up (struct net_device *dev);
@@ -516,8 +516,9 @@ static int _rtl92e_handle_assoc_response(struct net_device *dev,return 0 ; } -static void _rtl92e_prepare_beacon (struct r8192_priv *priv) +static void _rtl92e_prepare_beacon (unsigned long data) { +struct r8192_priv *priv = (struct r8192_priv *)data;struct net_device *dev = priv->rtllib->dev;struct sk_buff *pskb =NULL , *pnewskb =NULL ;struct cb_desc *tcb_desc =NULL ;
@@ -1007,14 +1008,11 @@ static void _rtl92e_init_priv_task(struct net_device *dev) (void *)rtl92e_hw_wakeup_wq, dev);INIT_DELAYED_WORK_RSL (&priv->rtllib->hw_sleep_wq, (void *)rtl92e_hw_sleep_wq, dev); -tasklet_init (&priv->irq_rx_tasklet, - (void (*)(unsigned long ))_rtl92e_irq_rx_tasklet, +tasklet_init (&priv->irq_rx_tasklet, _rtl92e_irq_rx_tasklet, (unsigned long )priv); -tasklet_init (&priv->irq_tx_tasklet, - (void (*)(unsigned long ))_rtl92e_irq_tx_tasklet, +tasklet_init (&priv->irq_tx_tasklet, _rtl92e_irq_tx_tasklet, (unsigned long )priv); -tasklet_init (&priv->irq_prepare_beacon_tasklet, - (void (*)(unsigned long ))_rtl92e_prepare_beacon, +tasklet_init (&priv->irq_prepare_beacon_tasklet, _rtl92e_prepare_beacon, (unsigned long )priv); }
@@ -2113,13 +2111,17 @@ static void _rtl92e_tx_resume(struct net_device *dev) } } -static void _rtl92e_irq_tx_tasklet (struct r8192_priv *priv) +static void _rtl92e_irq_tx_tasklet (unsigned long data) { +struct r8192_priv *priv = (struct r8192_priv *)data; +_rtl92e_tx_resume (priv->rtllib->dev); } -static void _rtl92e_irq_rx_tasklet (struct r8192_priv *priv) +static void _rtl92e_irq_rx_tasklet (unsigned long data) { +struct r8192_priv *priv = (struct r8192_priv *)data; +_rtl92e_rx_normal (priv->rtllib->dev); rtl92e_writel(priv->rtllib->dev, INTA_MASK,
--
2.20.1