Re: [PATCH] staging: qlge: fix build breakage with dumping enabled

From: Benjamin Poirier
Date: Tue Aug 25 2020 - 18:37:12 EST


On 2020-08-25 19:16 +0800, Coiby Xu wrote:
[...]
> > > @@ -1630,7 +1630,7 @@ void ql_dump_wqicb(struct wqicb *wqicb)
> > > (unsigned long long)le64_to_cpu(wqicb->cnsmr_idx_addr));
> > > }
> > >
> > > -void ql_dump_tx_ring(struct tx_ring *tx_ring)
> > > +void ql_dump_tx_ring(struct ql_adapter *qdev, struct tx_ring *tx_ring)
> > > {
> >
> > This can be fixed without adding another argument:
> > struct ql_adapter *qdev;
> >
> > if (!tx_ring)
> > return;
> >
> > qdev = tx_ring->qdev;
> >
> > ... similar comment for the other instances.
>
> Thank you for the simpler solution!
>
> For QL_OB_DUMP and QL_IB_DUMP, `struct ql_adapter *qdev` can't be
> obtained via container_of. So qdev are still directly passed to these
> functions.

That's right; sorry I didn't check those functions earlier.