From: Kalle Valo <kvalo@codeaurora.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Emil Renner Berthing <kernel@esmil.dk>,
linux-wireless <linux-wireless@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
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>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtlwifi: use tasklet_setup to initialize rx_work_tasklet
Date: Wed, 27 Jan 2021 17:19:46 +0200 [thread overview]
Message-ID: <87pn1q8l0t.fsf@codeaurora.org> (raw)
In-Reply-To: <CAF=yD-LGoVkf5ARHPsGAMbsruDq7iQ=X8c3cZRp5XaZC936EMw@mail.gmail.com> (Willem de Bruijn's message of "Wed, 27 Jan 2021 09:47:08 -0500")
Willem de Bruijn <willemdebruijn.kernel@gmail.com> writes:
> On Wed, Jan 27, 2021 at 5:23 AM 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.
>>
>> Fixes: 6b8c7574a5f8 ("rtlwifi: fix build warning")
>> Fixes: d3ccc14dfe95 ("rtlwifi/rtw88: convert tasklets to use new
>> tasklet_setup() API")
>> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
>
> Since the current code works, this could target net-next
This should go to wireless-drivers-next, not net-next.
> without Fixes tags.
Correct, no need for Fixes tag as there's no bug to fix. This is only
cleanup AFAICS.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2021-01-27 15:24 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 [this message]
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
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=87pn1q8l0t.fsf@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 \
--cc=willemdebruijn.kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.