Re: [PATCH] rdma/cxgb4: fix zalloc-simple.cocci warnings

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

 



On Monday, March 03/19/18, 2018 at 09:18:54 -0600, Jason Gunthorpe wrote:
> On Mon, Mar 19, 2018 at 05:55:29PM +0530, Raju Rangoju wrote:
> > Thanks for pointing this out. I will fix it.
> 
> When you say 'I will fix it', do you want me to apply this patch from
> Julia or do you plan something else? It looks fine to me.

I meant to say, I will fix it in the next version of the patch that I spin for the next
release cycle. We choose to send cxgb4 changes this release cycle and iw_cxgb4
next release cycle.
> 
> Jason
> 
> > On Monday, March 03/19/18, 2018 at 12:11:55 +0100, Julia Lawall wrote:
> > > From: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> > > 
> > >  Use zeroing allocator rather than allocator followed by memset with 0
> > > 
> > > Generated by: scripts/coccinelle/api/alloc/zalloc-simple.cocci
> > > 
> > > CC: Raju Rangoju <rajur@xxxxxxxxxxx>
> > > Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> > > Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
> > > 
> > > 
> > > url:
> > > https://github.com/0day-ci/linux/commits/Raju-Rangoju/rdma-cxgb4-Add-SRQ-support-for-Chelsio-adapters/20180313-062514
> > > :::::: branch date: 7 days ago
> > > :::::: commit date: 7 days ago
> > > 
> > >  qp.c |    6 ++----
> > >  1 file changed, 2 insertions(+), 4 deletions(-)
> > > 
> > > +++ b/drivers/infiniband/hw/cxgb4/qp.c
> > > @@ -2377,13 +2377,11 @@ static int alloc_srq_queue(struct c4iw_s
> > >  	wq->rqt_abs_idx = (wq->rqt_hwaddr - rdev->lldi.vr->rq.start) >>
> > >  		T4_RQT_ENTRY_SHIFT;
> > > 
> > > -	wq->queue = dma_alloc_coherent(&(rdev->lldi.pdev->dev),
> > > -			wq->memsize, &(wq->dma_addr),
> > > -			GFP_KERNEL);
> > > +	wq->queue = dma_zalloc_coherent(&(rdev->lldi.pdev->dev), wq->memsize,
> > > +					&(wq->dma_addr), GFP_KERNEL);
> > >  	if (!wq->queue)
> > >  		goto err_free_rqtpool;
> > > 
> > > -	memset(wq->queue, 0, wq->memsize);
> > >  	pci_unmap_addr_set(wq, mapping, wq->dma_addr);
> > > 
> > >  	wq->bar2_va = c4iw_bar2_addrs(rdev, wq->qid, T4_BAR2_QTYPE_EGRESS,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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