Message ID | 20200817090637.26887-6-allen.cryptic@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a36f50e5b93776d3f72cc5d78c85a0f3e5f2181c |
Delegated to: | Kalle Valo |
Headers | show |
Series | wirless: convert tasklets to use new tasklet_setup() | expand |
Allen Pais <allen.cryptic@gmail.com> wrote: > From: Allen Pais <allen.lkml@gmail.com> > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly > and remove .data field. > > Signed-off-by: Romain Perier <romain.perier@gmail.com> > Signed-off-by: Allen Pais <allen.lkml@gmail.com> 11 patches applied to wireless-drivers-next.git, thanks. a36f50e5b937 atmel: convert tasklets to use new tasklet_setup() API fc6722301428 b43legacy: convert tasklets to use new tasklet_setup() API 427a06beb072 brcmsmac: convert tasklets to use new tasklet_setup() API ae6cf59f80f7 ipw2x00: convert tasklets to use new tasklet_setup() API b81b9d372ac8 iwlegacy: convert tasklets to use new tasklet_setup() API 7433c9690318 intersil: convert tasklets to use new tasklet_setup() API 51c41aa93ef5 mwl8k: convert tasklets to use new tasklet_setup() API aff8e8d02ec2 qtnfmac: convert tasklets to use new tasklet_setup() API a0d6ea9b6e1c rt2x00: convert tasklets to use new tasklet_setup() API d3ccc14dfe95 rtlwifi/rtw88: convert tasklets to use new tasklet_setup() API 26721b02466e zd1211rw: convert tasklets to use new tasklet_setup() API
On Thu, Aug 27, 2020 at 01:23:20PM +0000, Kalle Valo wrote: > Allen Pais <allen.cryptic@gmail.com> wrote: > > > From: Allen Pais <allen.lkml@gmail.com> > > > > In preparation for unconditionally passing the > > struct tasklet_struct pointer to all tasklet > > callbacks, switch to using the new tasklet_setup() > > and from_tasklet() to pass the tasklet pointer explicitly > > and remove .data field. > > > > Signed-off-by: Romain Perier <romain.perier@gmail.com> > > Signed-off-by: Allen Pais <allen.lkml@gmail.com> > > 11 patches applied to wireless-drivers-next.git, thanks. > > a36f50e5b937 atmel: convert tasklets to use new tasklet_setup() API > fc6722301428 b43legacy: convert tasklets to use new tasklet_setup() API > 427a06beb072 brcmsmac: convert tasklets to use new tasklet_setup() API > ae6cf59f80f7 ipw2x00: convert tasklets to use new tasklet_setup() API > b81b9d372ac8 iwlegacy: convert tasklets to use new tasklet_setup() API > 7433c9690318 intersil: convert tasklets to use new tasklet_setup() API > 51c41aa93ef5 mwl8k: convert tasklets to use new tasklet_setup() API > aff8e8d02ec2 qtnfmac: convert tasklets to use new tasklet_setup() API > a0d6ea9b6e1c rt2x00: convert tasklets to use new tasklet_setup() API > d3ccc14dfe95 rtlwifi/rtw88: convert tasklets to use new tasklet_setup() API > 26721b02466e zd1211rw: convert tasklets to use new tasklet_setup() API > > -- > https://patchwork.kernel.org/patch/11717451/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches FWIW, I don't think a revert is needed here to wait for the from_tasket() -> container_from() API to land since from_tasklet() is already being used by other trees. Let's just get this done so we can get closer to ripping out the old tasklet API. We'll have to do a treewide from_timer(), from_tasklet() -> container_from() anyway...
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index a63b5c2f1e17..365c2ee19d03 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -1199,7 +1199,6 @@ static void at76_rx_callback(struct urb *urb) { struct at76_priv *priv = urb->context; - priv->rx_tasklet.data = (unsigned long)urb; tasklet_schedule(&priv->rx_tasklet); } @@ -1545,10 +1544,10 @@ static inline int at76_guess_freq(struct at76_priv *priv) return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); } -static void at76_rx_tasklet(unsigned long param) +static void at76_rx_tasklet(struct tasklet_struct *t) { - struct urb *urb = (struct urb *)param; - struct at76_priv *priv = urb->context; + struct at76_priv *priv = from_tasklet(priv, t, rx_tasklet); + struct urb *urb = priv->rx_urb; struct at76_rx_buffer *buf; struct ieee80211_rx_status rx_status = { 0 }; @@ -2215,7 +2214,7 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev) INIT_WORK(&priv->work_join_bssid, at76_work_join_bssid); INIT_DELAYED_WORK(&priv->dwork_hw_scan, at76_dwork_hw_scan); - tasklet_init(&priv->rx_tasklet, at76_rx_tasklet, 0); + tasklet_setup(&priv->rx_tasklet, at76_rx_tasklet); priv->pm_mode = AT76_PM_OFF; priv->pm_period = 0;