Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipw2x00: Fix -Wcast-function-type

correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Phong Tran and committed by
Kalle Valo
ebd77feb 475eec11

+7 -5
+4 -3
drivers/net/wireless/intel/ipw2x00/ipw2100.c
··· 3206 3206 } 3207 3207 } 3208 3208 3209 - static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) 3209 + static void ipw2100_irq_tasklet(unsigned long data) 3210 3210 { 3211 + struct ipw2100_priv *priv = (struct ipw2100_priv *)data; 3211 3212 struct net_device *dev = priv->net_dev; 3212 3213 unsigned long flags; 3213 3214 u32 inta, tmp; ··· 6007 6006 spin_unlock_irqrestore(&priv->low_lock, flags); 6008 6007 } 6009 6008 6010 - static void ipw2100_irq_tasklet(struct ipw2100_priv *priv); 6009 + static void ipw2100_irq_tasklet(unsigned long data); 6011 6010 6012 6011 static const struct net_device_ops ipw2100_netdev_ops = { 6013 6012 .ndo_open = ipw2100_open, ··· 6137 6136 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); 6138 6137 INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event); 6139 6138 6140 - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) 6139 + tasklet_init(&priv->irq_tasklet, 6141 6140 ipw2100_irq_tasklet, (unsigned long)priv); 6142 6141 6143 6142 /* NOTE: We do not start the deferred work for status checks yet */
+3 -2
drivers/net/wireless/intel/ipw2x00/ipw2200.c
··· 1945 1945 wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); 1946 1946 } 1947 1947 1948 - static void ipw_irq_tasklet(struct ipw_priv *priv) 1948 + static void ipw_irq_tasklet(unsigned long data) 1949 1949 { 1950 + struct ipw_priv *priv = (struct ipw_priv *)data; 1950 1951 u32 inta, inta_mask, handled = 0; 1951 1952 unsigned long flags; 1952 1953 int rc = 0; ··· 10678 10677 INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); 10679 10678 #endif /* CONFIG_IPW2200_QOS */ 10680 10679 10681 - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) 10680 + tasklet_init(&priv->irq_tasklet, 10682 10681 ipw_irq_tasklet, (unsigned long)priv); 10683 10682 10684 10683 return ret;