From: Kalle Valo <kvalo@codeaurora.org>
To: Emil Renner Berthing <kernel@esmil.dk>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
Emil Renner Berthing <kernel@esmil.dk>,
Ping-Ke Shih <pkshih@realtek.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Allen Pais <allen.lkml@gmail.com>,
Romain Perier <romain.perier@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: rtlwifi: use tasklet_setup to initialize rx_work_tasklet
Date: Mon, 8 Feb 2021 10:38:32 +0000 (UTC) [thread overview]
Message-ID: <20210208103832.EE4E3C433ED@smtp.codeaurora.org> (raw)
In-Reply-To: <20210126171550.3066-1-kernel@esmil.dk>
Emil Renner Berthing <kernel@esmil.dk> wrote:
> In commit d3ccc14dfe95 most of the tasklets in this driver was
> updated to the new API. However for the rx_work_tasklet only the
> type of the callback was changed from
> void _rtl_rx_work(unsigned long data)
> to
> void _rtl_rx_work(struct tasklet_struct *t).
>
> The initialization of rx_work_tasklet was still open-coded and the
> function pointer just cast into the old type, and hence nothing sets
> rx_work_tasklet.use_callback = true and the callback was still called as
>
> t->func(t->data);
>
> with uninitialized/zero t->data.
>
> Commit 6b8c7574a5f8 changed the casting of _rtl_rx_work a bit and
> initialized t->data to a pointer to the tasklet cast to an unsigned
> long.
>
> This way calling t->func(t->data) might actually work through all the
> casting, but it still doesn't update the code to use the new tasklet
> API.
>
> Let's use the new tasklet_setup to initialize rx_work_tasklet properly
> and set rx_work_tasklet.use_callback = true so that the callback is
> called as
>
> t->callback(t);
>
> without all the casting.
>
> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
> Acked-by: Willem de Bruijn <willemb@google.com>
Patch applied to wireless-drivers-next.git, thanks.
ca04217add8e rtlwifi: use tasklet_setup to initialize rx_work_tasklet
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210126171550.3066-1-kernel@esmil.dk/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2021-02-08 10:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 17:15 [PATCH] rtlwifi: use tasklet_setup to initialize rx_work_tasklet Emil Renner Berthing
2021-01-27 14:47 ` Willem de Bruijn
2021-01-27 15:19 ` Kalle Valo
2021-01-27 15:25 ` Emil Renner Berthing
2021-01-27 15:33 ` Kalle Valo
2021-01-27 16:01 ` Emil Renner Berthing
2021-02-08 10:38 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210208103832.EE4E3C433ED@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=allen.lkml@gmail.com \
--cc=davem@davemloft.net \
--cc=kernel@esmil.dk \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=romain.perier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).