From: Allen Pais <allen.lkml@gmail.com>
To: davem@davemloft.net
Cc: gerrit@erg.abdn.ac.uk, 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,
steffen.klassert@secunet.com, herbert@gondor.apana.org.au,
netdev@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
Romain Perier <romain.perier@gmail.com>,
Allen Pais <apais@linux.microsoft.com>
Subject: [RESEND net-next 5/8] net: rds: convert tasklets to use new tasklet_setup() API
Date: Tue, 6 Oct 2020 12:01:58 +0530 [thread overview]
Message-ID: <20201006063201.294959-6-allen.lkml@gmail.com> (raw)
In-Reply-To: <20201006063201.294959-1-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 <apais@linux.microsoft.com>
---
net/rds/ib_cm.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 06603dd1c..396d6abf8 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -314,9 +314,9 @@ static void poll_scq(struct rds_ib_connection *ic, struct ib_cq *cq,
}
}
-static void rds_ib_tasklet_fn_send(unsigned long data)
+static void rds_ib_tasklet_fn_send(struct tasklet_struct *t)
{
- struct rds_ib_connection *ic = (struct rds_ib_connection *)data;
+ struct rds_ib_connection *ic = from_tasklet(ic, t, i_send_tasklet);
struct rds_connection *conn = ic->conn;
rds_ib_stats_inc(s_ib_tasklet_call);
@@ -354,9 +354,9 @@ static void poll_rcq(struct rds_ib_connection *ic, struct ib_cq *cq,
}
}
-static void rds_ib_tasklet_fn_recv(unsigned long data)
+static void rds_ib_tasklet_fn_recv(struct tasklet_struct *t)
{
- struct rds_ib_connection *ic = (struct rds_ib_connection *)data;
+ struct rds_ib_connection *ic = from_tasklet(ic, t, i_recv_tasklet);
struct rds_connection *conn = ic->conn;
struct rds_ib_device *rds_ibdev = ic->rds_ibdev;
struct rds_ib_ack_state state;
@@ -1218,10 +1218,8 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
}
INIT_LIST_HEAD(&ic->ib_node);
- tasklet_init(&ic->i_send_tasklet, rds_ib_tasklet_fn_send,
- (unsigned long)ic);
- tasklet_init(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv,
- (unsigned long)ic);
+ tasklet_setup(&ic->i_send_tasklet, rds_ib_tasklet_fn_send);
+ tasklet_setup(&ic->i_recv_tasklet, rds_ib_tasklet_fn_recv);
mutex_init(&ic->i_recv_mutex);
#ifndef KERNEL_HAS_ATOMIC64
spin_lock_init(&ic->i_ack_lock);
--
2.25.1
next prev parent reply other threads:[~2020-10-06 6:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 6:31 [RESEND net-next 0/8] net: convert tasklets to use new Allen Pais
2020-10-06 6:31 ` [RESEND net-next 1/8] net: dccp: convert tasklets to use new tasklet_setup() API Allen Pais
2020-10-06 14:42 ` Jakub Kicinski
2020-10-07 9:40 ` Allen Pais
2020-10-06 6:31 ` [RESEND net-next 2/8] net: ipv4: " Allen Pais
2020-10-06 6:31 ` [RESEND net-next 3/8] net: mac80211: " Allen Pais
2020-10-06 6:31 ` [RESEND net-next 4/8] net: mac802154: " Allen Pais
2020-10-06 7:52 ` Stefan Schmidt
2020-10-06 6:31 ` Allen Pais [this message]
2020-10-06 6:31 ` [RESEND net-next 6/8] net: sched: " Allen Pais
2020-10-06 6:32 ` [RESEND net-next 7/8] net: smc: " Allen Pais
2020-10-06 6:32 ` [RESEND net-next 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=20201006063201.294959-6-allen.lkml@gmail.com \
--to=allen.lkml@gmail.com \
--cc=alex.aring@gmail.com \
--cc=apais@linux.microsoft.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gerrit@erg.abdn.ac.uk \
--cc=herbert@gondor.apana.org.au \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=romain.perier@gmail.com \
--cc=santosh.shilimkar@oracle.com \
--cc=stefan@datenfreihafen.org \
--cc=steffen.klassert@secunet.com \
--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).