lkml.org 
[lkml]   [2020]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2020-08-18 11:20    [W:2.282 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site