From patchwork Mon Aug 17 09:06:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE530C433E3 for ; Mon, 17 Aug 2020 09:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 935A32063A for ; Mon, 17 Aug 2020 09:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JY3V9Xh5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728745AbgHQJHO (ORCPT ); Mon, 17 Aug 2020 05:07:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbgHQJHK (ORCPT ); Mon, 17 Aug 2020 05:07:10 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CFDC061389; Mon, 17 Aug 2020 02:07:10 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y6so7193071plt.3; Mon, 17 Aug 2020 02:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XcVaL6jGfhFSxrDyrsbWGAsDNySY/sWbGAZGLU3gyzk=; b=JY3V9Xh556SzkVgVMCirZFhDu2U+XAm5skIQXkLG+L/smjkx+BWJly7LRdp6Vb41/6 HO10YgVp4jj+yrEsicrpr55/dlYX+/DhF4LNX1SfUoVLXHc6P8T6JQwx6v28ApzRnrqw AFMD5OD2kYe3py4u2EMpS1KVbuqCYXk6C//XuqI0HlHCXJnCt9fChM1WZkxhoDqb2+fE mNxlktDTrtBdr/Qt5v2WT/4TfgN4EkIlGGc9w0fuV6S40IDhrEkQ9sQ9bOxjtw4ho+Kj mwjisCeV8lTUQnfNSBoe3GtyTZ2RQQ/AzhonUEsDp9cUkNzico58Rua6ROy1iEyV+hiC EgYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XcVaL6jGfhFSxrDyrsbWGAsDNySY/sWbGAZGLU3gyzk=; b=I7bQgbOEjmQ/LfPYqgwA9niO+5pRERxWdMCyN/U/nBxG+zh4q6sCWPiR4fQT+a1PW3 DXar1Gze3098V1sYXxy6qCJv9i1TqkTT47Zvhc5JErnq2fPQEv9YO9/4cj5s2QHGuuzW WzId5GytRr826IGR0lptFOHHICWddEGh5KTtcNrU/NzvHTG9RBuLbIEMHnZJRC1JS2pY miCgEya3lno8IkNZY1X9wzZXdgI3jjPv9XpWvYU3rEQ2m2HprWuTjUcCvy+R6M+FriKy o7y7Zk1BzcSukNL9Oe6fo+8JE8KBzV8KoyEOf7XPnYEcsbVxyMa8tvWVDqRVlYyV7AFY l4Pw== X-Gm-Message-State: AOAM532VFQpmgOiFSUa0W2aSYwWQSk+88SIp5347McrFJZ1pSo7+bfuz 2UEGHdgi0eH+d2xmX66tYPo= X-Google-Smtp-Source: ABdhPJzCW10KMVHwyUEG2ej9tlzap4atUtwsiqdBwmbw5fh9/J72Qn/L3y9ivQV1+VkPFCXzzo0Gmw== X-Received: by 2002:a17:90a:3948:: with SMTP id n8mr8769780pjf.156.1597655229969; Mon, 17 Aug 2020 02:07:09 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:07:09 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 02/16] wireless: ath9k: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:23 +0530 Message-Id: <20200817090637.26887-3-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++-- drivers/net/wireless/ath/ath9k/beacon.c | 4 ++-- drivers/net/wireless/ath/ath9k/htc.h | 4 ++-- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 6 ++---- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 ++++---- drivers/net/wireless/ath/ath9k/init.c | 5 ++--- drivers/net/wireless/ath/ath9k/main.c | 4 ++-- drivers/net/wireless/ath/ath9k/wmi.c | 7 +++---- drivers/net/wireless/ath/ath9k/wmi.h | 2 +- 9 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index a412b352182c..e06b74a54a69 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -713,7 +713,7 @@ struct ath_beacon { bool tx_last; }; -void ath9k_beacon_tasklet(unsigned long data); +void ath9k_beacon_tasklet(struct tasklet_struct *t); void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *main_vif, bool beacons); void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif); @@ -1117,7 +1117,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) common->bus_ops->read_cachesize(common, csz); } -void ath9k_tasklet(unsigned long data); +void ath9k_tasklet(struct tasklet_struct *t); int ath_cabq_update(struct ath_softc *); u8 ath9k_parse_mpdudensity(u8 mpdudensity); irqreturn_t ath_isr(int irq, void *dev); diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index e36f947e19fc..4876bff2dc2c 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -385,9 +385,9 @@ void ath9k_csa_update(struct ath_softc *sc) ath9k_csa_update_vif, sc); } -void ath9k_beacon_tasklet(unsigned long data) +void ath9k_beacon_tasklet(struct tasklet_struct *t) { - struct ath_softc *sc = (struct ath_softc *)data; + struct ath_softc *sc = from_tasklet(sc, t, bcon_tasklet); struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ath_buf *bf = NULL; diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index 9f64e32381f9..0a1634238e67 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h @@ -583,14 +583,14 @@ int ath9k_htc_tx_get_slot(struct ath9k_htc_priv *priv); void ath9k_htc_tx_clear_slot(struct ath9k_htc_priv *priv, int slot); void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv); void ath9k_htc_txstatus(struct ath9k_htc_priv *priv, void *wmi_event); -void ath9k_tx_failed_tasklet(unsigned long data); +void ath9k_tx_failed_tasklet(struct tasklet_struct *t); void ath9k_htc_tx_cleanup_timer(struct timer_list *t); bool ath9k_htc_csa_is_finished(struct ath9k_htc_priv *priv); int ath9k_rx_init(struct ath9k_htc_priv *priv); void ath9k_rx_cleanup(struct ath9k_htc_priv *priv); void ath9k_host_rx_init(struct ath9k_htc_priv *priv); -void ath9k_rx_tasklet(unsigned long data); +void ath9k_rx_tasklet(struct tasklet_struct *t); u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv); void ath9k_htc_ps_wakeup(struct ath9k_htc_priv *priv); diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 1d6ad8d46607..8136291791d6 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -645,10 +645,8 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, spin_lock_init(&priv->tx.tx_lock); mutex_init(&priv->mutex); mutex_init(&priv->htc_pm_lock); - tasklet_init(&priv->rx_tasklet, ath9k_rx_tasklet, - (unsigned long)priv); - tasklet_init(&priv->tx_failed_tasklet, ath9k_tx_failed_tasklet, - (unsigned long)priv); + tasklet_setup(&priv->rx_tasklet, ath9k_rx_tasklet); + tasklet_setup(&priv->tx_failed_tasklet, ath9k_tx_failed_tasklet); INIT_DELAYED_WORK(&priv->ani_work, ath9k_htc_ani_work); INIT_WORK(&priv->ps_work, ath9k_ps_work); INIT_WORK(&priv->fatal_work, ath9k_fatal_work); diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index b353995bdd45..bdfa22fdc867 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -570,9 +570,9 @@ void ath9k_htc_tx_drain(struct ath9k_htc_priv *priv) spin_unlock_bh(&priv->tx.tx_lock); } -void ath9k_tx_failed_tasklet(unsigned long data) +void ath9k_tx_failed_tasklet(struct tasklet_struct *t) { - struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; + struct ath9k_htc_priv *priv = from_tasklet(priv, t, tx_failed_tasklet); spin_lock(&priv->tx.tx_lock); if (priv->tx.flags & ATH9K_HTC_OP_TX_DRAIN) { @@ -1062,9 +1062,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, /* * FIXME: Handle FLUSH later on. */ -void ath9k_rx_tasklet(unsigned long data) +void ath9k_rx_tasklet(struct tasklet_struct *t) { - struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; + struct ath9k_htc_priv *priv = from_tasklet(priv, t, rx_tasklet); struct ath9k_htc_rxbuf *rxbuf = NULL, *tmp_buf = NULL; struct ieee80211_rx_status rx_status; struct sk_buff *skb; diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 4d72cd7daaa2..42eefdfc58d1 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -728,9 +728,8 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, spin_lock_init(&sc->sc_pm_lock); spin_lock_init(&sc->chan_lock); mutex_init(&sc->mutex); - tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc); - tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet, - (unsigned long)sc); + tasklet_setup(&sc->intr_tq, ath9k_tasklet); + tasklet_setup(&sc->bcon_tasklet, ath9k_beacon_tasklet); timer_setup(&sc->sleep_timer, ath_ps_full_sleep, 0); INIT_WORK(&sc->hw_reset_work, ath_reset_work); diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a47f6e978095..3d44552fb534 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -368,9 +368,9 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) ath_dynack_node_deinit(sc->sc_ah, an); } -void ath9k_tasklet(unsigned long data) +void ath9k_tasklet(struct tasklet_struct *t) { - struct ath_softc *sc = (struct ath_softc *)data; + struct ath_softc *sc = from_tasklet(sc, t, intr_tq); struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); enum ath_reset_type type; diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index e7a3127395be..fb82c0910d5d 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c @@ -106,8 +106,7 @@ struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv) mutex_init(&wmi->multi_rmw_mutex); init_completion(&wmi->cmd_wait); INIT_LIST_HEAD(&wmi->pending_tx_events); - tasklet_init(&wmi->wmi_event_tasklet, ath9k_wmi_event_tasklet, - (unsigned long)wmi); + tasklet_setup(&wmi->wmi_event_tasklet, ath9k_wmi_event_tasklet); return wmi; } @@ -136,9 +135,9 @@ void ath9k_wmi_event_drain(struct ath9k_htc_priv *priv) spin_unlock_irqrestore(&priv->wmi->wmi_lock, flags); } -void ath9k_wmi_event_tasklet(unsigned long data) +void ath9k_wmi_event_tasklet(struct tasklet_struct *t) { - struct wmi *wmi = (struct wmi *)data; + struct wmi *wmi = from_tasklet(wmi, t, wmi_event_tasklet); struct ath9k_htc_priv *priv = wmi->drv_priv; struct wmi_cmd_hdr *hdr; void *wmi_event; diff --git a/drivers/net/wireless/ath/ath9k/wmi.h b/drivers/net/wireless/ath/ath9k/wmi.h index d8b912206232..be1f126d0306 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.h +++ b/drivers/net/wireless/ath/ath9k/wmi.h @@ -185,7 +185,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, u8 *cmd_buf, u32 cmd_len, u8 *rsp_buf, u32 rsp_len, u32 timeout); -void ath9k_wmi_event_tasklet(unsigned long data); +void ath9k_wmi_event_tasklet(struct tasklet_struct *t); void ath9k_fatal_work(struct work_struct *work); void ath9k_wmi_event_drain(struct ath9k_htc_priv *priv); void ath9k_stop_wmi(struct ath9k_htc_priv *priv); From patchwork Mon Aug 17 09:06:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E95C433E1 for ; Mon, 17 Aug 2020 09:08:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE6452063A for ; Mon, 17 Aug 2020 09:08:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g0cmPZRh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728139AbgHQJIE (ORCPT ); Mon, 17 Aug 2020 05:08:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727807AbgHQJHZ (ORCPT ); Mon, 17 Aug 2020 05:07:25 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84CBC061389; Mon, 17 Aug 2020 02:07:25 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id y206so7898279pfb.10; Mon, 17 Aug 2020 02:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MGsv8A1wVj28a3UQWL19W4pLCqNK/n7XN47Mle0gRf0=; b=g0cmPZRhcILxoEnjZPRTGxSCc+cAfwGWvZIKj7Y+pbzSNHFFO2zTQQN9KYG+34IVwa j3TmLzAjPiU619fIp3yeL9Igsl1XpItyWHlMwXbOP7+NgYacG0jRF242DFUmHleurIWx 3Y9yWFTnEOJRCJ7ZC4Vn5W6OcqD4DBy4D9poqtyW+dZlaE7K1b4SArKNzEJ3d2lbjgOx TZUC0SBVVAbOR/qPbgoQgp2C3i3Lg0InJUuvelxpeog5G6YJQfg7UmMBEVCwRQum8OL3 Pu1TYq++IQhlG3AKR4qVlVTeSx4EWsVGlBlyUvUlbVpvEEs8bNk+kbthRmKlEmH2HNmW Qhmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MGsv8A1wVj28a3UQWL19W4pLCqNK/n7XN47Mle0gRf0=; b=lv5uD/JrecHpt+48D85K+DfMyKdvDVsJj4uxu0QOA8rQ4tcWPj67veTazwVEUwcKsJ nCFHAS0PLJ1fNjh/jiqQwzWLm/OKgTtaSZoBYOZHSc8n/PTxAdFpHsOdX9Fb2eCBtyAQ XftxlmfoQP42qb3tuxD5lE+bgAm4r+lYRdYYYJz1Bv5u6MZrtG0LVRRxE65fFSlrTWbC ZhF4ExoWJjZaVIl63R8AKowj3x/+ceDSwJQ/tx8XmO80HQBuq1xSrJdgCizKW3qcoDSh T/1zAA7BEf6xqpS1l03acC/K5ZcXlY1mwqV7029/KU6QQkTe72d0cO0eosJkdsQ9hUXl 77Dg== X-Gm-Message-State: AOAM533f6wa75+TdxIP+n1JTLS/GY9cqt3Xf8QoO/GJfl1nuXIrOF0+J CiMPo4wq+XSeiN5efWU7hkM= X-Google-Smtp-Source: ABdhPJyIoQbr9T/8qnWekXPjsOiorbPCvMa//vMXiCVBRpI1R33p2QuX6J5OeDaVuSprkarw2Orp4w== X-Received: by 2002:a63:3241:: with SMTP id y62mr9589717pgy.305.1597655245210; Mon, 17 Aug 2020 02:07:25 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:07:24 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais Subject: [PATCH 04/16] wireless: ath11k: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:25 +0530 Message-Id: <20200817090637.26887-5-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Allen Pais --- drivers/net/wireless/ath/ath11k/ahb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 30092841ac46..28d7e833e27f 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -675,9 +675,9 @@ static void ath11k_ahb_free_irq(struct ath11k_base *ab) ath11k_ahb_free_ext_irq(ab); } -static void ath11k_ahb_ce_tasklet(unsigned long data) +static void ath11k_ahb_ce_tasklet(struct tasklet_struct *t) { - struct ath11k_ce_pipe *ce_pipe = (struct ath11k_ce_pipe *)data; + struct ath11k_ce_pipe *ce_pipe = from_tasklet(ce_pipe, t, intr_tq); ath11k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num); @@ -827,8 +827,7 @@ static int ath11k_ahb_config_irq(struct ath11k_base *ab) irq_idx = ATH11K_IRQ_CE0_OFFSET + i; - tasklet_init(&ce_pipe->intr_tq, ath11k_ahb_ce_tasklet, - (unsigned long)ce_pipe); + tasklet_setup(&ce_pipe->intr_tq, ath11k_ahb_ce_tasklet); irq = platform_get_irq_byname(ab->pdev, irq_name[irq_idx]); ret = request_irq(irq, ath11k_ahb_ce_interrupt_handler, IRQF_TRIGGER_RISING, irq_name[irq_idx], From patchwork Mon Aug 17 09:06:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36CD5C433E3 for ; Mon, 17 Aug 2020 09:10:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12BC2206C0 for ; Mon, 17 Aug 2020 09:10:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bUpe3lkH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728306AbgHQJKT (ORCPT ); Mon, 17 Aug 2020 05:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgHQJHl (ORCPT ); Mon, 17 Aug 2020 05:07:41 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77BB9C061389; Mon, 17 Aug 2020 02:07:41 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y10so5622143plr.11; Mon, 17 Aug 2020 02:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2IBGDTRlqNvahuHmxcRRXVtAp4AqF0ucZxlKJk+dn2M=; b=bUpe3lkHHiWeE9fypq5FMRZVDtUY8VoTccue34JGh/9p2k4OhRzS6BjyY4Bd9qTRiD HcbcBOCidPnkUlckjG0pQpPr3SBnPnm+On29sqxfzZdLsl8FQ7OvWGY8atHAg53TIKUP Nhm3LAImHY0LceA50ndVDTenrCowNHDuP0rucbFJFtN5rJxnQgq+F+Qtc3cYgh8nXF4H hKgi+3LEO2QPnAJoz2HAsTmDwJrUArE1nTbsBra+um9cAwBjBM9gv4zgoaVU4haxTTFW SyDjDgB7rO++ebAZ/h9uwZDeZuM5jI4l1DhA2tmsoxy4eKcodtYoitoHwHh61f9+CApm x/aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2IBGDTRlqNvahuHmxcRRXVtAp4AqF0ucZxlKJk+dn2M=; b=ulOpr+TJEwOi8bVZH9JpQH39kUxgQfQq5sSk/a9Sa4zVladYWAjwFGD8RaRC9jY12P LLs8R0E/tP3JDTbTEEw2a/GZKcL2MYwpJYCp1WIg8p8A81N90m8RIzmvm2gfJZE1hMym L02UewghV+IBcTr/a+X/UxLHh7caNn5NeOzEF/eL710g5+KUnrrKX045aTC6fNW7jQlt HZG9krh4wOHUCNRv4gfoQCFbAhnsFqRSI2pIiCUmrqJVmyl+E5LuTG82cdF1jwU0Jv44 fQErh6ffWSFH40bPcLabNw/fAlfvlOf87arE6/aah6kc5rwptSYrBxyTCb9fbUqCg17n bxpw== X-Gm-Message-State: AOAM533AvG+0NLBTmBsRuHlPmiUwvaBM5++ShhgFegRKnP4kykvfCm6q O4mLUI1/yeVWDIgeoOa5JN0= X-Google-Smtp-Source: ABdhPJzNy7hxGHuoAT9Ds/zo0r/p3Xdwvw7xt6TvMKktGn938rhVPwowpw50RfYo/4rBLuS0/Azjfg== X-Received: by 2002:a17:902:c111:: with SMTP id 17mr9611024pli.46.1597655260971; Mon, 17 Aug 2020 02:07:40 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:07:40 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 06/16] wireless: b43legacy: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:27 +0530 Message-Id: <20200817090637.26887-7-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wireless/broadcom/b43legacy/main.c | 8 +++----- drivers/net/wireless/broadcom/b43legacy/pio.c | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index 2eaf481f03f1..15d592cf056c 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c @@ -1275,9 +1275,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev) } /* Interrupt handler bottom-half */ -static void b43legacy_interrupt_tasklet(unsigned long data) +static void b43legacy_interrupt_tasklet(struct tasklet_struct *t) { - struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data; + struct b43legacy_wldev *dev = from_tasklet(dev, t, isr_tasklet); u32 reason; u32 dma_reason[ARRAY_SIZE(dev->dma_reason)]; u32 merged_dma_reason = 0; @@ -3741,9 +3741,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev, wldev->wl = wl; b43legacy_set_status(wldev, B43legacy_STAT_UNINIT); wldev->bad_frames_preempt = modparam_bad_frames_preempt; - tasklet_init(&wldev->isr_tasklet, - b43legacy_interrupt_tasklet, - (unsigned long)wldev); + tasklet_setup(&wldev->isr_tasklet, b43legacy_interrupt_tasklet); if (modparam_pio) wldev->__using_pio = true; INIT_LIST_HEAD(&wldev->list); diff --git a/drivers/net/wireless/broadcom/b43legacy/pio.c b/drivers/net/wireless/broadcom/b43legacy/pio.c index cbb761378619..aac413d0f629 100644 --- a/drivers/net/wireless/broadcom/b43legacy/pio.c +++ b/drivers/net/wireless/broadcom/b43legacy/pio.c @@ -264,9 +264,9 @@ static int pio_tx_packet(struct b43legacy_pio_txpacket *packet) return 0; } -static void tx_tasklet(unsigned long d) +static void tx_tasklet(struct tasklet_struct *t) { - struct b43legacy_pioqueue *queue = (struct b43legacy_pioqueue *)d; + struct b43legacy_pioqueue *queue = from_tasklet(queue, t, txtask); struct b43legacy_wldev *dev = queue->dev; unsigned long flags; struct b43legacy_pio_txpacket *packet, *tmp_packet; @@ -331,8 +331,7 @@ struct b43legacy_pioqueue *b43legacy_setup_pioqueue(struct b43legacy_wldev *dev, INIT_LIST_HEAD(&queue->txfree); INIT_LIST_HEAD(&queue->txqueue); INIT_LIST_HEAD(&queue->txrunning); - tasklet_init(&queue->txtask, tx_tasklet, - (unsigned long)queue); + tasklet_setup(&queue->txtask, tx_tasklet); value = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); value &= ~B43legacy_MACCTL_BE; From patchwork Mon Aug 17 09:06:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262436 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40235C433DF for ; Mon, 17 Aug 2020 09:10:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11C80207DF for ; Mon, 17 Aug 2020 09:10:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HklbjWKA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbgHQJJ7 (ORCPT ); Mon, 17 Aug 2020 05:09:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728786AbgHQJHt (ORCPT ); Mon, 17 Aug 2020 05:07:49 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD0CFC061342; Mon, 17 Aug 2020 02:07:48 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id d4so7383714pjx.5; Mon, 17 Aug 2020 02:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n+X9d5vT8SC5Pz64vMe7g5tLMlNwSaXJUm4aDGP4qA4=; b=HklbjWKAcCZdZeoSN/XgxzMU8/wRR2Auy4T9VjyP8XL3EIQu/B9o+zT6u5qH1TWRTO au79B2xEPMbiU4xrZ7zXzCQg2VLDMdMpeFEnijkByJRFPZk21pfGl8pTIGNrHe4rZ0ni dYqi+t1m58tLfCir+Phy7Nl8KTdaT/s097e8/hTweB1PlagUBuFpF8aWswX9j0LeZKWC SWAUNzK2TtD0qVupQ4jErl5/7mwh5liwf091mhsSzuXH9r+7nJpo8ac6gvpD2+63nUd0 leTlsxBQRsRxUbOwtInPSxCIdbsoxDt1COqkjCjyv37RC5EcRiqk8ywMT1xhU2a9+yso deDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=n+X9d5vT8SC5Pz64vMe7g5tLMlNwSaXJUm4aDGP4qA4=; b=YsltANe3mtkQ1ThVLUTf3gt3s8H1WY5KDpftSzSKsY8fVHEac3T+FmGu5+RoNRsTsa o+RYtl2xA1+lFC5SMKu48h2arsXJFR2VO857xYTMANwLMLE/xS/PRuZFeaBQ1IdHoHxO tOi8jVv8DMYRyCqiJMI6E6bmcefC5gyfQU4t99Hxasmaf3C44MZwD0rhacQjB5TubVSt t3xyDdU90WIOlP/gcyLJDJCZGCkZ9qDpid+oER003CZExF478IlKbQByp/OtugHTpY3H XCxdDQHPrAGlfPDK+meZldKWj889VI4VSicHcahpA/+6CzcIIxvhOHwVq9dx/Wo7I9SF 1tdw== X-Gm-Message-State: AOAM530s5DiV5PxAhNnSmx36E5gLF/jrgUQq/gJOWsc8XIGlatoxr8Pw Jmg1TskVqkdJOAU84c9QOi8= X-Google-Smtp-Source: ABdhPJyi1nfjNr696xImaFKXbCsrOUzUKLp19qvJx/y7bR1RGilmldIE98IAYhPWvrOKTAjfe6rlfA== X-Received: by 2002:a17:902:7484:: with SMTP id h4mr10089195pll.139.1597655268400; Mon, 17 Aug 2020 02:07:48 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:07:47 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 07/16] wireless: brcm80211: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:28 +0530 Message-Id: <20200817090637.26887-8-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- .../net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 6 +++--- .../net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c index 648efcbc819f..521abe5ce5b8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c @@ -982,11 +982,11 @@ static const struct ieee80211_ops brcms_ops = { .set_tim = brcms_ops_beacon_set_tim, }; -void brcms_dpc(unsigned long data) +void brcms_dpc(struct tasklet_struct *t) { struct brcms_info *wl; - wl = (struct brcms_info *) data; + wl = from_tasklet(wl, t, tasklet); spin_lock_bh(&wl->lock); @@ -1149,7 +1149,7 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev) init_waitqueue_head(&wl->tx_flush_wq); /* setup the bottom half handler */ - tasklet_init(&wl->tasklet, brcms_dpc, (unsigned long) wl); + tasklet_setup(&wl->tasklet, brcms_dpc); spin_lock_init(&wl->lock); spin_lock_init(&wl->isr_lock); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.h index 198053dfc310..eaf926a96a88 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.h @@ -106,7 +106,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl, void brcms_free_timer(struct brcms_timer *timer); void brcms_add_timer(struct brcms_timer *timer, uint ms, int periodic); bool brcms_del_timer(struct brcms_timer *timer); -void brcms_dpc(unsigned long data); +void brcms_dpc(struct tasklet_struct *t); void brcms_timer(struct brcms_timer *t); void brcms_fatal_error(struct brcms_info *wl); From patchwork Mon Aug 17 09:06:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F036C433DF for ; Mon, 17 Aug 2020 09:08:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A5232063A for ; Mon, 17 Aug 2020 09:08:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="THtE6gYB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728807AbgHQJI1 (ORCPT ); Mon, 17 Aug 2020 05:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728179AbgHQJIF (ORCPT ); Mon, 17 Aug 2020 05:08:05 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6063C061347; Mon, 17 Aug 2020 02:08:03 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id 74so7896655pfx.13; Mon, 17 Aug 2020 02:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O5yUISL0n5UDVWTbrqgSqFJ+8un0wnfOhWT/JxFzWgU=; b=THtE6gYBzS3NJNRoDz41V470lbExfVM+Uv76yOpHQy6P0r8xs1svhnqBmf7GsSUyJ9 0OhkBtZ5PAN6RKOWkeyUSCb3niRwhko+isyeF4gb4C1TJQuCxHie5WSg0euWz8e/64b+ KfHpmXQAK8npYwyRVZz8g6iK7aanPSsLlin/b0AHzZn0rIkTgZVugtkYB9XIt+g0qlxM OIXr/2BJbpundJOcGmWtRGizakuH/mM/jLtAmQYn32O5lGqHO9qZfCVG7JVw7sDijVAq 0ewRCAbin84he/EdyU/BlWomEAyNc3S6H014rT2rRdNbuj5znR19FV3OLYb/f33A+8XT ZkbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O5yUISL0n5UDVWTbrqgSqFJ+8un0wnfOhWT/JxFzWgU=; b=CpXM5WcHwWbLX9ys7X+tJ/PDnzPqpe1HIVapIYbYQt/R1v7sAoGf7Rl7zpijcMq42I Taiw0gp/uRy8p1djkwXv1t0JJ4sLLHDgumTw1zrOxEiUhENw1Y0w3O/Qt8OAo5km/ssk xSUtBJSYwfOPZ5DNkH++69sx1ajKBlPI6T4ZAYg/yXFP1jIrVAG3q3NFLzIcWszz4E1V s0Bmhnplv4E2OYEj2OExSgo3x9a/vdUvgzq5th+RkraO3N/kmDW1nQyHhCc6BwLCkMIX C10fOd8Fs3B7WPc4/bis+GgBrq8vsJZPahaw4t8O63YCx0Ioye06PgjpGG+t+LwPy4DQ RFJQ== X-Gm-Message-State: AOAM532GjMSUdJXOSpVloIEnZlcujT6yTW8aXbtSrqodP6VP5V7DTDzg Q+72/YiSNMlCPOUXPuhWAmU= X-Google-Smtp-Source: ABdhPJx7a7b9XqfiJheNfprZ6SjPVpk7DN4CXcJ6/Hoyh5xc/cTtA43nxillzq8XLt/TaWHc8YdwWQ== X-Received: by 2002:aa7:9493:: with SMTP id z19mr10706326pfk.190.1597655283311; Mon, 17 Aug 2020 02:08:03 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:08:02 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 09/16] wireless: iwlegacy: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:30 +0530 Message-Id: <20200817090637.26887-10-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 8 +++----- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index 9167c3d2711d..5fe98bbefc56 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -1374,9 +1374,9 @@ il3945_dump_nic_error_log(struct il_priv *il) } static void -il3945_irq_tasklet(unsigned long data) +il3945_irq_tasklet(struct tasklet_struct *t) { - struct il_priv *il = (struct il_priv *)data; + struct il_priv *il = from_tasklet(il, t, irq_tasklet); u32 inta, handled = 0; u32 inta_fh; unsigned long flags; @@ -3399,9 +3399,7 @@ il3945_setup_deferred_work(struct il_priv *il) timer_setup(&il->watchdog, il_bg_watchdog, 0); - tasklet_init(&il->irq_tasklet, - il3945_irq_tasklet, - (unsigned long)il); + tasklet_setup(&il->irq_tasklet, il3945_irq_tasklet); } static void diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index e73c223a7d28..afc54c63c4c6 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4344,9 +4344,9 @@ il4965_synchronize_irq(struct il_priv *il) } static void -il4965_irq_tasklet(unsigned long data) +il4965_irq_tasklet(struct tasklet_struct *t) { - struct il_priv *il = (struct il_priv *)data; + struct il_priv *il = from_tasklet(il, t, irq_tasklet); u32 inta, handled = 0; u32 inta_fh; unsigned long flags; @@ -6238,9 +6238,7 @@ il4965_setup_deferred_work(struct il_priv *il) timer_setup(&il->watchdog, il_bg_watchdog, 0); - tasklet_init(&il->irq_tasklet, - il4965_irq_tasklet, - (unsigned long)il); + tasklet_setup(&il->irq_tasklet, il4965_irq_tasklet); } static void From patchwork Mon Aug 17 09:06:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262440 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49650C433E1 for ; Mon, 17 Aug 2020 09:08:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17D2B20829 for ; Mon, 17 Aug 2020 09:08:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JLjuypKG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728668AbgHQJI0 (ORCPT ); Mon, 17 Aug 2020 05:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728424AbgHQJIL (ORCPT ); Mon, 17 Aug 2020 05:08:11 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A47DC061389; Mon, 17 Aug 2020 02:08:11 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id f9so7384486pju.4; Mon, 17 Aug 2020 02:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+rEDgp4YGA9R1HriHFsXyzXz2mawGnxPe0arFuiO0Zc=; b=JLjuypKGX2u5yy1C0DonZ/t8FnMc2hcQDa5cqNXAswjJ9jticvJ7dNyDSIkikvU3N8 qUf2/NzmT45szRLG6BRaCXCuYJ+8WerB2bJww+stYD9ho25QzJJvgSG2ZNOzUS5qnOhu jtFjGC5X/q/CzTDWXhli6EhVSVmDOhTTwkwNeUdPbz2teNB7iQgmM+XI7oobWf8dlf87 0b1i31WO4/ezmxXt//sRBxXkcB7TzqFP4+5f05eE2mqzcLmc8C5vTjTXs39NzQrrystt 2b3O0ufAluYrEpzqgXHxv299XQN3h4FervN12IYdU1d5m6P0Ruj6LiR2tDm0mBjtCtTL Y5kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+rEDgp4YGA9R1HriHFsXyzXz2mawGnxPe0arFuiO0Zc=; b=mwZg9hRLR/MKYmrzZRdz+f+YFg2Ur43XSyZlezFC4egm3epZ2eSt/nXE0veHNr4a8i pMpD1ZwIW0SDqGuSX/32HwtktMTOKcU/k2OX1uDu1QgkgH3T7GEG+cEcUraOfftds8IT yeCbVfKzob26/yFYysp/sGsgpPEfK85YLN/uSHP+6Nw31zszT00XiAnl82nOM1Al41XF 96OMolAAbGa5OdoIBAhBlOWITS/s6MMXT1RgrwBbhyq+abBNrCnJaNRhqcv5/4Jos+vk l555sRbQ0cKg3h+YSvt1v0cw7aJldDW3iN4/sKp1Z5DjpmIpY3Zzb7jinZa78Vsb8+CV Ugxg== X-Gm-Message-State: AOAM531nY0Mi7E6veWYL5xzpkW787cOQQk8/hmpRs7qUYwkQOqamCAKw Jt4caGwPP/gL/z3OwvzHcG8= X-Google-Smtp-Source: ABdhPJwW2Zolr0t7C/hp6Olz06ZaYa+bIXcgNSy12uYcQgLnah2aehX25oeVGB1Q+txYJRymWwXWaw== X-Received: by 2002:a17:90b:358c:: with SMTP id mm12mr12109718pjb.154.1597655291001; Mon, 17 Aug 2020 02:08:11 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:08:10 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 10/16] wireless: intersil: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:31 +0530 Message-Id: <20200817090637.26887-11-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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 Signed-off-by: Allen Pais --- .../net/wireless/intersil/hostap/hostap_hw.c | 18 +++++++++--------- drivers/net/wireless/intersil/orinoco/main.c | 7 +++---- drivers/net/wireless/intersil/p54/p54pci.c | 8 ++++---- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index b6c497ce12e1..ba00a4d8a26f 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c @@ -2083,9 +2083,9 @@ static void hostap_rx_skb(local_info_t *local, struct sk_buff *skb) /* Called only as a tasklet (software IRQ) */ -static void hostap_rx_tasklet(unsigned long data) +static void hostap_rx_tasklet(struct tasklet_struct *t) { - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_tasklet(local, t, rx_tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->rx_list)) != NULL) @@ -2288,9 +2288,9 @@ static void prism2_tx_ev(local_info_t *local) /* Called only as a tasklet (software IRQ) */ -static void hostap_sta_tx_exc_tasklet(unsigned long data) +static void hostap_sta_tx_exc_tasklet(struct tasklet_struct *t) { - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_tasklet(local, t, sta_tx_exc_tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->sta_tx_exc_list)) != NULL) { @@ -2390,9 +2390,9 @@ static void prism2_txexc(local_info_t *local) /* Called only as a tasklet (software IRQ) */ -static void hostap_info_tasklet(unsigned long data) +static void hostap_info_tasklet(struct tasklet_struct *t) { - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_tasklet(local, t, info_tasklet); struct sk_buff *skb; while ((skb = skb_dequeue(&local->info_list)) != NULL) { @@ -2469,9 +2469,9 @@ static void prism2_info(local_info_t *local) /* Called only as a tasklet (software IRQ) */ -static void hostap_bap_tasklet(unsigned long data) +static void hostap_bap_tasklet(struct tasklet_struct *t) { - local_info_t *local = (local_info_t *) data; + local_info_t *local = from_tasklet(local, t, bap_tasklet); struct net_device *dev = local->dev; u16 ev; int frames = 30; @@ -3183,7 +3183,7 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, /* Initialize tasklets for handling hardware IRQ related operations * outside hw IRQ handler */ #define HOSTAP_TASKLET_INIT(q, f, d) \ -do { memset((q), 0, sizeof(*(q))); (q)->func = (f); (q)->data = (d); } \ +do { memset((q), 0, sizeof(*(q))); (q)->func = (void(*)(unsigned long))(f); } \ while (0) HOSTAP_TASKLET_INIT(&local->bap_tasklet, hostap_bap_tasklet, (unsigned long) local); diff --git a/drivers/net/wireless/intersil/orinoco/main.c b/drivers/net/wireless/intersil/orinoco/main.c index 00264a14e52c..78d3cb986c19 100644 --- a/drivers/net/wireless/intersil/orinoco/main.c +++ b/drivers/net/wireless/intersil/orinoco/main.c @@ -1062,9 +1062,9 @@ static void orinoco_rx(struct net_device *dev, stats->rx_dropped++; } -static void orinoco_rx_isr_tasklet(unsigned long data) +static void orinoco_rx_isr_tasklet(struct tasklet_struct *t) { - struct orinoco_private *priv = (struct orinoco_private *) data; + struct orinoco_private *priv = from_tasklet(priv, t, rx_tasklet); struct net_device *dev = priv->ndev; struct orinoco_rx_data *rx_data, *temp; struct hermes_rx_descriptor *desc; @@ -2198,8 +2198,7 @@ struct orinoco_private INIT_WORK(&priv->wevent_work, orinoco_send_wevents); INIT_LIST_HEAD(&priv->rx_list); - tasklet_init(&priv->rx_tasklet, orinoco_rx_isr_tasklet, - (unsigned long) priv); + tasklet_setup(&priv->rx_tasklet, orinoco_rx_isr_tasklet); spin_lock_init(&priv->scan_lock); INIT_LIST_HEAD(&priv->scan_list); diff --git a/drivers/net/wireless/intersil/p54/p54pci.c b/drivers/net/wireless/intersil/p54/p54pci.c index 9d96c8b8409d..94064d7cff52 100644 --- a/drivers/net/wireless/intersil/p54/p54pci.c +++ b/drivers/net/wireless/intersil/p54/p54pci.c @@ -278,10 +278,10 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index, } } -static void p54p_tasklet(unsigned long dev_id) +static void p54p_tasklet(struct tasklet_struct *t) { - struct ieee80211_hw *dev = (struct ieee80211_hw *)dev_id; - struct p54p_priv *priv = dev->priv; + struct p54p_priv *priv = from_tasklet(priv, t, tasklet); + struct ieee80211_hw *dev = pci_get_drvdata(priv->pdev); struct p54p_ring_control *ring_control = priv->ring_control; p54p_check_tx_ring(dev, &priv->tx_idx_mgmt, 3, ring_control->tx_mgmt, @@ -620,7 +620,7 @@ static int p54p_probe(struct pci_dev *pdev, priv->common.tx = p54p_tx; spin_lock_init(&priv->lock); - tasklet_init(&priv->tasklet, p54p_tasklet, (unsigned long)dev); + tasklet_setup(&priv->tasklet, p54p_tasklet); err = request_firmware_nowait(THIS_MODULE, 1, "isl3886pci", &priv->pdev->dev, GFP_KERNEL, From patchwork Mon Aug 17 09:06:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCC42C433DF for ; Mon, 17 Aug 2020 09:08:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 869FD2063A for ; Mon, 17 Aug 2020 09:08:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ki3ruPaD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728846AbgHQJIz (ORCPT ); Mon, 17 Aug 2020 05:08:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbgHQJIm (ORCPT ); Mon, 17 Aug 2020 05:08:42 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E3AC061389; Mon, 17 Aug 2020 02:08:42 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id r4so7189659pls.2; Mon, 17 Aug 2020 02:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xxa+05scFrzuBe+yAyWNv34XMm2FcC+GEQxivOtc53E=; b=Ki3ruPaD0Z9pPfj72g+hjVnPsRghNxtnQMqty9t1TocTqaaMchv1YYsLcM9PAI7dmy yGDlsF/c18MbgaTAVcUnuDmpY8ofvc9cRCkrdj05ykWRwWRIpiwpZMfLqDdU+qG5O/1W vJ65HMXjtaQeKzDxf6t7G8jhj3SxwZaYamh3KR3/ThXaDeoDxBbJQShrPmXUhcBqT83Q mHhP/pGDb3YY84kY7b8/y9cGOxT4yzY3E1Rf32j8jQybAND2K6VW8qlnU+BMZChm7hTf T2r5Xojpre88O+a9cn9wXi8ehy16zUHUFy8WLOMUo0Dcx6m7i++SAciHmLSDQU9tyjPy rCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xxa+05scFrzuBe+yAyWNv34XMm2FcC+GEQxivOtc53E=; b=MzXYvgNtjPFxsUb61E19Z/D1gzEZrLlntoMLMR/V3vB5IbJIOO0JBrE/b+opxJvGE+ lqM8ZKwbsQaPTeL7HTSIRwYZElJmvkyhXDzV74hbXJCkdI6KhR5adIFQJ3dgULzruh1p rF8aO7iZcoJTtbtyoJBzYLHt6QM6mCDSC9f4PnTUcziPAhxt5jz5XwoERvmi1csOdIib Gs5mtsci4mIv8fdKuoCnrl3aP4VijNHmyRwBSHXwnq/uMa88LXz86sfyJuETLwAuqkIt qfxSnijrqBiW6tPlagWpa0iH724aSI+DgoSR16wAGWmPAM841wixGjaoXEaEXFHbXfBY X1NA== X-Gm-Message-State: AOAM531H6/qAs5LBWphknokCsG+hMr2buS0/XYWH94FbbbXm9y9+4Hdu BtTXNyEiIOAXTV4YQaexu0I= X-Google-Smtp-Source: ABdhPJxQW4KA0xZjB/vdlce2wn7jeZLOHGg8HjqGfJ5HwDWTuIKqfW8rKWGknDtkLWCZG1/U0A3bzw== X-Received: by 2002:a17:902:82c3:: with SMTP id u3mr10494198plz.81.1597655322221; Mon, 17 Aug 2020 02:08:42 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:08:41 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 14/16] wireless: ralink: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:35 +0530 Message-Id: <20200817090637.26887-15-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- .../net/wireless/ralink/rt2x00/rt2400pci.c | 14 ++++++----- .../net/wireless/ralink/rt2x00/rt2500pci.c | 14 ++++++----- .../net/wireless/ralink/rt2x00/rt2800mmio.c | 24 +++++++++++-------- .../net/wireless/ralink/rt2x00/rt2800mmio.h | 10 ++++---- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 10 ++++---- .../net/wireless/ralink/rt2x00/rt2x00dev.c | 5 ++-- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 20 +++++++++------- 7 files changed, 54 insertions(+), 43 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c index c1ac933349d1..687a4686f3ae 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c @@ -1319,9 +1319,10 @@ static inline void rt2400pci_enable_interrupt(struct rt2x00_dev *rt2x00dev, spin_unlock_irq(&rt2x00dev->irqmask_lock); } -static void rt2400pci_txstatus_tasklet(unsigned long data) +static void rt2400pci_txstatus_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + txstatus_tasklet); u32 reg; /* @@ -1347,17 +1348,18 @@ static void rt2400pci_txstatus_tasklet(unsigned long data) } } -static void rt2400pci_tbtt_tasklet(unsigned long data) +static void rt2400pci_tbtt_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); rt2x00lib_beacondone(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt2400pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE); } -static void rt2400pci_rxdone_tasklet(unsigned long data) +static void rt2400pci_rxdone_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + rxdone_tasklet); if (rt2x00mmio_rxdone(rt2x00dev)) tasklet_schedule(&rt2x00dev->rxdone_tasklet); else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c index 0859adebd860..ea06041f594a 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c @@ -1447,9 +1447,10 @@ static inline void rt2500pci_enable_interrupt(struct rt2x00_dev *rt2x00dev, spin_unlock_irq(&rt2x00dev->irqmask_lock); } -static void rt2500pci_txstatus_tasklet(unsigned long data) +static void rt2500pci_txstatus_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + txstatus_tasklet); u32 reg; /* @@ -1475,17 +1476,18 @@ static void rt2500pci_txstatus_tasklet(unsigned long data) } } -static void rt2500pci_tbtt_tasklet(unsigned long data) +static void rt2500pci_tbtt_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); rt2x00lib_beacondone(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt2500pci_enable_interrupt(rt2x00dev, CSR8_TBCN_EXPIRE); } -static void rt2500pci_rxdone_tasklet(unsigned long data) +static void rt2500pci_rxdone_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + rxdone_tasklet); if (rt2x00mmio_rxdone(rt2x00dev)) tasklet_schedule(&rt2x00dev->rxdone_tasklet); else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c index 110bb391c372..d4fb3cc6d6a3 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c @@ -210,18 +210,19 @@ static inline void rt2800mmio_enable_interrupt(struct rt2x00_dev *rt2x00dev, spin_unlock_irq(&rt2x00dev->irqmask_lock); } -void rt2800mmio_pretbtt_tasklet(unsigned long data) +void rt2800mmio_pretbtt_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + pretbtt_tasklet); rt2x00lib_pretbtt(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt2800mmio_enable_interrupt(rt2x00dev, INT_MASK_CSR_PRE_TBTT); } EXPORT_SYMBOL_GPL(rt2800mmio_pretbtt_tasklet); -void rt2800mmio_tbtt_tasklet(unsigned long data) +void rt2800mmio_tbtt_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); struct rt2800_drv_data *drv_data = rt2x00dev->drv_data; u32 reg; @@ -254,9 +255,10 @@ void rt2800mmio_tbtt_tasklet(unsigned long data) } EXPORT_SYMBOL_GPL(rt2800mmio_tbtt_tasklet); -void rt2800mmio_rxdone_tasklet(unsigned long data) +void rt2800mmio_rxdone_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + rxdone_tasklet); if (rt2x00mmio_rxdone(rt2x00dev)) tasklet_schedule(&rt2x00dev->rxdone_tasklet); else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) @@ -264,9 +266,10 @@ void rt2800mmio_rxdone_tasklet(unsigned long data) } EXPORT_SYMBOL_GPL(rt2800mmio_rxdone_tasklet); -void rt2800mmio_autowake_tasklet(unsigned long data) +void rt2800mmio_autowake_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + autowake_tasklet); rt2800mmio_wakeup(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt2800mmio_enable_interrupt(rt2x00dev, @@ -307,9 +310,10 @@ static void rt2800mmio_fetch_txstatus(struct rt2x00_dev *rt2x00dev) spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); } -void rt2800mmio_txstatus_tasklet(unsigned long data) +void rt2800mmio_txstatus_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + txstatus_tasklet); rt2800_txdone(rt2x00dev, 16); diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.h b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.h index adcd9d54ac1c..05708950f24d 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.h @@ -126,11 +126,11 @@ void rt2800mmio_fill_rxdone(struct queue_entry *entry, struct rxdone_entry_desc *rxdesc); /* Interrupt functions */ -void rt2800mmio_txstatus_tasklet(unsigned long data); -void rt2800mmio_pretbtt_tasklet(unsigned long data); -void rt2800mmio_tbtt_tasklet(unsigned long data); -void rt2800mmio_rxdone_tasklet(unsigned long data); -void rt2800mmio_autowake_tasklet(unsigned long data); +void rt2800mmio_txstatus_tasklet(struct tasklet_struct *t); +void rt2800mmio_pretbtt_tasklet(struct tasklet_struct *t); +void rt2800mmio_tbtt_tasklet(struct tasklet_struct *t); +void rt2800mmio_rxdone_tasklet(struct tasklet_struct *t); +void rt2800mmio_autowake_tasklet(struct tasklet_struct *t); irqreturn_t rt2800mmio_interrupt(int irq, void *dev_instance); void rt2800mmio_toggle_irq(struct rt2x00_dev *rt2x00dev, enum dev_state state); diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h index ecc60d8cbb01..780be81863b6 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h @@ -518,11 +518,11 @@ struct rt2x00lib_ops { /* * TX status tasklet handler. */ - void (*txstatus_tasklet) (unsigned long data); - void (*pretbtt_tasklet) (unsigned long data); - void (*tbtt_tasklet) (unsigned long data); - void (*rxdone_tasklet) (unsigned long data); - void (*autowake_tasklet) (unsigned long data); + void (*txstatus_tasklet) (struct tasklet_struct *t); + void (*pretbtt_tasklet) (struct tasklet_struct *t); + void (*tbtt_tasklet) (struct tasklet_struct *t); + void (*rxdone_tasklet) (struct tasklet_struct *t); + void (*autowake_tasklet) (struct tasklet_struct *t); /* * Device init handlers. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index 8c6d3099b19d..b04f76551ca4 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1167,9 +1167,8 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) */ #define RT2X00_TASKLET_INIT(taskletname) \ if (rt2x00dev->ops->lib->taskletname) { \ - tasklet_init(&rt2x00dev->taskletname, \ - rt2x00dev->ops->lib->taskletname, \ - (unsigned long)rt2x00dev); \ + tasklet_setup(&rt2x00dev->taskletname, \ + rt2x00dev->ops->lib->taskletname); \ } RT2X00_TASKLET_INIT(txstatus_tasklet); diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c index eefce76fc99b..146675ee34c4 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c @@ -2190,34 +2190,38 @@ static void rt61pci_enable_mcu_interrupt(struct rt2x00_dev *rt2x00dev, spin_unlock_irq(&rt2x00dev->irqmask_lock); } -static void rt61pci_txstatus_tasklet(unsigned long data) +static void rt61pci_txstatus_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + txstatus_tasklet); + rt61pci_txdone(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt61pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_TXDONE); } -static void rt61pci_tbtt_tasklet(unsigned long data) +static void rt61pci_tbtt_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, tbtt_tasklet); rt2x00lib_beacondone(rt2x00dev); if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt61pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_BEACON_DONE); } -static void rt61pci_rxdone_tasklet(unsigned long data) +static void rt61pci_rxdone_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + rxdone_tasklet); if (rt2x00mmio_rxdone(rt2x00dev)) tasklet_schedule(&rt2x00dev->rxdone_tasklet); else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) rt61pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RXDONE); } -static void rt61pci_autowake_tasklet(unsigned long data) +static void rt61pci_autowake_tasklet(struct tasklet_struct *t) { - struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; + struct rt2x00_dev *rt2x00dev = from_tasklet(rt2x00dev, t, + autowake_tasklet); rt61pci_wakeup(rt2x00dev); rt2x00mmio_register_write(rt2x00dev, M2H_CMD_DONE_CSR, 0xffffffff); From patchwork Mon Aug 17 09:06:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 262437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EED16C433E3 for ; Mon, 17 Aug 2020 09:09:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C48062063A for ; Mon, 17 Aug 2020 09:09:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BuOgHzE2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728851AbgHQJJS (ORCPT ); Mon, 17 Aug 2020 05:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728852AbgHQJI6 (ORCPT ); Mon, 17 Aug 2020 05:08:58 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 028DCC061389; Mon, 17 Aug 2020 02:08:58 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id mt12so7503716pjb.4; Mon, 17 Aug 2020 02:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D+11JrgXx7k4d/FBCFtyQxCBWxyvZCVFtXZuzuow0+s=; b=BuOgHzE28eNNZeAco81WMgtdeCy3BCMioAewuwDcPW9jxpWv0Fx583aJMZcCBWK7h6 qh0oWohqomHQV8AGV515Ji7QHCKUsODKV6t/lJH/ZmUnggwMWtbBTKMj3Aj/J/V5RHyv EhKx3r4q+fYBg2EbYvIdf/XmSq5XK38tKOt++5XQkfShCQPPu7ucl+YhCqbxRw/Zen1L o2BCvZM1LsvcxdcnVhYEW3YsXG+DyZMCqdJ1yfF9K6OpCI/cxQV4L8mHlv4pMXJA3RcN Fo5zwoYoznOB4Alio5BN19B87afO8+TEEC4Gt0Nx/56CRQnRrHtdoq5ErrOYIso7P65A AUxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D+11JrgXx7k4d/FBCFtyQxCBWxyvZCVFtXZuzuow0+s=; b=ABANBWy8CXSlZisvNibhy2Qty1h4fC5m/8fW/lWbXa3pQ2AeLop3yjOVWtVO5Q0F/t t0UjCOhm4wYrHReT5aVOtUgmglNIKzSY982LJCrNCnxZ55iSvIWGXws647CJJXVlmZO/ Cbu01uq4lk2yex+8ViRuUDvGVomFZTYWZtxAMqiO91mquSWYnp6m8zSJyr7YZhXt9YO/ biF28B89l4erXBngbbc9qaM/135WGSeVfpbO3klBcao1dWfpqN3HhGfWjW3u07cyFY67 /lRlZTCDqkW32k2agLKsDy/7dQLgomcYQqlxrlADz1eeu+JM+jUa3lVLSJUOXXXad4Lg eWzQ== X-Gm-Message-State: AOAM530rN/X11j0/+AN7ump7aBsuzebJzSq93QLs8s7ZhvQXN9BgBxF0 +EY1/Z2PxODeIZIC4+hetbk= X-Google-Smtp-Source: ABdhPJys3AsmwHjPrNMuZrrc4BAN4yRcYm8S/SES9n5z7vXN5z3HTEzUCoo7hzUnU+Zzpgrz7BhseQ== X-Received: by 2002:a17:90a:eb17:: with SMTP id j23mr11440313pjz.151.1597655337480; Mon, 17 Aug 2020 02:08:57 -0700 (PDT) Received: from localhost.localdomain ([49.207.202.98]) by smtp.gmail.com with ESMTPSA id t14sm16616237pgb.51.2020.08.17.02.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:08:56 -0700 (PDT) From: Allen Pais To: kvalo@codeaurora.org, kuba@kernel.org, jirislaby@kernel.org, mickflemm@gmail.com, mcgrof@kernel.org, chunkeey@googlemail.com, Larry.Finger@lwfinger.net, stas.yakovlev@gmail.com, helmut.schaa@googlemail.com, pkshih@realtek.com, yhchuang@realtek.com, dsd@gentoo.org, kune@deine-taler.de Cc: keescook@chromium.org, ath11k@lists.infradead.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, b43-dev@lists.infradead.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, Allen Pais , Romain Perier Subject: [PATCH 16/16] wireless: zydas: convert tasklets to use new tasklet_setup() API Date: Mon, 17 Aug 2020 14:36:37 +0530 Message-Id: <20200817090637.26887-17-allen.cryptic@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200817090637.26887-1-allen.cryptic@gmail.com> References: <20200817090637.26887-1-allen.cryptic@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Allen Pais 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 fieldd Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c index 65b5985ad402..8b3d248bac6e 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c @@ -1140,9 +1140,9 @@ static void zd_rx_idle_timer_handler(struct work_struct *work) zd_usb_reset_rx(usb); } -static void zd_usb_reset_rx_idle_timer_tasklet(unsigned long param) +static void zd_usb_reset_rx_idle_timer_tasklet(struct tasklet_struct *t) { - struct zd_usb *usb = (struct zd_usb *)param; + struct zd_usb *usb = from_tasklet(usb, t, rx.reset_timer_tasklet); zd_usb_reset_rx_idle_timer(usb); } @@ -1178,8 +1178,8 @@ static inline void init_usb_rx(struct zd_usb *usb) } ZD_ASSERT(rx->fragment_length == 0); INIT_DELAYED_WORK(&rx->idle_work, zd_rx_idle_timer_handler); - rx->reset_timer_tasklet.func = zd_usb_reset_rx_idle_timer_tasklet; - rx->reset_timer_tasklet.data = (unsigned long)usb; + rx->reset_timer_tasklet.func = (void (*)(unsigned long)) + zd_usb_reset_rx_idle_timer_tasklet; } static inline void init_usb_tx(struct zd_usb *usb)