From: Allen Pais <allen.cryptic@gmail.com>
To: gerrit@erg.abdn.ac.uk, davem@davemloft.net, kuba@kernel.org,
edumazet@google.com, kuznet@ms2.inr.ac.ru,
yoshfuji@linux-ipv6.org, johannes@sipsolutions.net,
alex.aring@gmail.com, stefan@datenfreihafen.org,
santosh.shilimkar@oracle.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us
Cc: keescook@chromium.org, netdev@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-wpan@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-s390@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
Romain Perier <romain.perier@gmail.com>
Subject: [PATCH 1/8] net: dccp: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 14:21:13 +0530 [thread overview]
Message-ID: <20200817085120.24894-1-allen.cryptic@gmail.com> (raw)
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.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
net/dccp/timer.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index 0e06dfc32273..f174ecb2fb4e 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -220,9 +220,10 @@ static void dccp_delack_timer(struct timer_list *t)
*
* See the comments above %ccid_dequeueing_decision for supported modes.
*/
-static void dccp_write_xmitlet(unsigned long data)
+static void dccp_write_xmitlet(struct tasklet_struct *t)
{
- struct sock *sk = (struct sock *)data;
+ struct dccp_sock *dp = from_tasklet(dp, t, dccps_xmitlet);
+ struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk;
bh_lock_sock(sk);
if (sock_owned_by_user(sk))
@@ -236,16 +237,15 @@ static void dccp_write_xmitlet(unsigned long data)
static void dccp_write_xmit_timer(struct timer_list *t)
{
struct dccp_sock *dp = from_timer(dp, t, dccps_xmit_timer);
- struct sock *sk = &dp->dccps_inet_connection.icsk_inet.sk;
- dccp_write_xmitlet((unsigned long)sk);
+ dccp_write_xmitlet(&dp->dccps_xmitlet);
}
void dccp_init_xmit_timers(struct sock *sk)
{
struct dccp_sock *dp = dccp_sk(sk);
- tasklet_init(&dp->dccps_xmitlet, dccp_write_xmitlet, (unsigned long)sk);
+ tasklet_setup(&dp->dccps_xmitlet, dccp_write_xmitlet);
timer_setup(&dp->dccps_xmit_timer, dccp_write_xmit_timer, 0);
inet_csk_init_xmit_timers(sk, &dccp_write_timer, &dccp_delack_timer,
&dccp_keepalive_timer);
--
2.17.1
next reply other threads:[~2020-08-17 8:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 8:51 Allen Pais [this message]
2020-08-17 8:51 ` [PATCH 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17 8:51 ` [PATCH 3/8] net: mac80211: " Allen Pais
2020-08-17 8:56 ` Johannes Berg
2020-08-17 8:51 ` [PATCH 4/8] net: mac802154: " Allen Pais
2020-08-17 12:19 ` Stefan Schmidt
2020-08-17 8:51 ` [PATCH 5/8] net: rds: " Allen Pais
2020-08-17 8:51 ` [PATCH 6/8] net: sched: " Allen Pais
2020-08-17 8:51 ` [PATCH 7/8] net: smc: " Allen Pais
2020-08-17 8:51 ` [PATCH 8/8] net: xfrm: " Allen Pais
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=20200817085120.24894-1-allen.cryptic@gmail.com \
--to=allen.cryptic@gmail.com \
--cc=alex.aring@gmail.com \
--cc=allen.lkml@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gerrit@erg.abdn.ac.uk \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romain.perier@gmail.com \
--cc=santosh.shilimkar@oracle.com \
--cc=stefan@datenfreihafen.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yoshfuji@linux-ipv6.org \
/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).