[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOMdWS+YQAWY=L5KqTKhZsg3faK8Z6mUzZ_U6rZ+Y3ybrHF1qQ@mail.gmail.com>
Date: Tue, 18 Aug 2020 14:49:21 +0530
From: Allen <allen.lkml@...il.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: selvin.xavier@...adcom.com, devesh.sharma@...adcom.com,
somnath.kotur@...adcom.com, sriharsha.basavapatna@...adcom.com,
nareshkumar.pbs@...adcom.com, Kees Cook <keescook@...omium.org>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
Romain Perier <romain.perier@...il.com>
Subject: Re: [PATCH 1/5] infiniband: bnxt_re: convert tasklets to use new
tasklet_setup() API
> > diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> > index 4e211162acee..7261be29fb09 100644
> > +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> > @@ -50,7 +50,7 @@
> > #include "qplib_sp.h"
> > #include "qplib_fp.h"
> >
> > -static void bnxt_qplib_service_creq(unsigned long data);
> > +static void bnxt_qplib_service_creq(struct tasklet_struct *t);
> >
> > /* Hardware communication channel */
> > static int __wait_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie)
> > @@ -79,7 +79,7 @@ static int __block_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie)
> > goto done;
> > do {
> > mdelay(1); /* 1m sec */
> > - bnxt_qplib_service_creq((unsigned long)rcfw);
> > + bnxt_qplib_service_creq(&rcfw->creq.creq_tasklet);
> > } while (test_bit(cbit, cmdq->cmdq_bitmap) && --count);
> > done:
> > return count ? 0 : -ETIMEDOUT;
> > @@ -369,10 +369,10 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
> > }
> >
> > /* SP - CREQ Completion handlers */
> > -static void bnxt_qplib_service_creq(unsigned long data)
> > +static void bnxt_qplib_service_creq(struct tasklet_struct *t)
> > {
> > - struct bnxt_qplib_rcfw *rcfw = (struct bnxt_qplib_rcfw *)data;
> > - struct bnxt_qplib_creq_ctx *creq = &rcfw->creq;
> > + struct bnxt_qplib_creq_ctx *creq = from_tasklet(creq, t, creq_tasklet);
>
> This is just:
>
> struct bnxt_qplib_rcfw *rcfw = from_tasklet(rcfw, t, crew.creq_tasklet);
>
> No need for the extra container_of
Sure, will fix it and spin V2.
Thanks.
>
> Jason
--
- Allen
Powered by blists - more mailing lists