Re: [PATCH rdma-next v2] RDMA: Explicitly pass in the dma_device to ib_register_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 06, 2020 at 08:35:54AM +0100, Christoph Hellwig wrote:
> > index f904bb34477a..2f117ac11c8b 100644
> > +++ b/drivers/infiniband/sw/rdmavt/vt.c
> > @@ -581,7 +581,11 @@ int rvt_register_device(struct rvt_dev_info *rdi)
> >  	spin_lock_init(&rdi->n_cqs_lock);
> > 
> >  	/* DMA Operations */
> > -	rdi->ibdev.dev.dma_ops = rdi->ibdev.dev.dma_ops ? : &dma_virt_ops;
> > +	rdi->ibdev.dev.dma_ops = &dma_virt_ops;
> > +	rdi->ibdev.dev.dma_parms = rdi->ibdev.dev.parent->dma_parms;
> > +	rdi->ibdev.dev.dma_mask = rdi->ibdev.dev.parent->dma_mask;
> 
> This copies the dma_mask pointer, which seems completely bogus.

And pointless since virt_ops doesn't do anything with it?

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux