Julian Calaby wrote on Mon, Jul 02, 2012 : > On Sat, Jun 30, 2012 at 11:16 PM, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote: > > diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c > > index 478b374..8bad8b6 100644 > > --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c > > +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c > > @@ -4241,10 +4240,8 @@ static void brcms_b_watchdog(void *arg) > > } > > > > /* common watchdog code */ > > -static void brcms_c_watchdog(void *arg) > > +static void brcms_c_watchdog(struct brcms_c_info *wlc) > > { > > - struct brcms_c_info *wlc = (struct brcms_c_info *) arg; > > - > > BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); > > > > if (!wlc->pub->up) > > @@ -4284,7 +4281,9 @@ static void brcms_c_watchdog(void *arg) > > > > static void brcms_c_watchdog_by_timer(void *arg) > > { > > - brcms_c_watchdog(arg); > > + struct brcms_c_info *wlc = (struct brcms_c_info *) arg; > > + > > + brcms_c_watchdog(wlc); > > You remove 2 cases of this pattern in your patch then add one. Why? I'm not Hauke :) but as far as I understand, brcms_c_watchdog_by_timer is used by brcms_init_timer which expects a void (*fn) (void *); and which is also used with brcms_c_radio_timer Admitedly, brcms_c_radio_timer also uses a struct brcms_c_info* as argument, so everything could be change this way, but I think it's not completely insane to keep callbacks as void* :) I also see the point of removing this "pattern" since it makes it easier to understand with the proper type information. Regards, -- Asmadeus | Dominique Martinet -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html