From 7c845eb5e184977d9c7135ae20d012b59f8cc729 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 8 Aug 2014 14:24:46 -0700 Subject: scsi: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: Jayamohan Kallickal Cc: Dario Ballabio Cc: Michael Neuffer Cc: "Stephen M. Cameron" Cc: Neela Syam Kolli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/csiostor/csio_wr.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/scsi/csiostor') diff --git a/drivers/scsi/csiostor/csio_wr.c b/drivers/scsi/csiostor/csio_wr.c index 4255ce264abf..773da14cfa14 100644 --- a/drivers/scsi/csiostor/csio_wr.c +++ b/drivers/scsi/csiostor/csio_wr.c @@ -232,7 +232,7 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize, q = wrm->q_arr[free_idx]; - q->vstart = pci_alloc_consistent(hw->pdev, qsz, &q->pstart); + q->vstart = pci_zalloc_consistent(hw->pdev, qsz, &q->pstart); if (!q->vstart) { csio_err(hw, "Failed to allocate DMA memory for " @@ -240,12 +240,6 @@ csio_wr_alloc_q(struct csio_hw *hw, uint32_t qsize, uint32_t wrsize, return -1; } - /* - * We need to zero out the contents, importantly for ingress, - * since we start with a generatiom bit of 1 for ingress. - */ - memset(q->vstart, 0, qsz); - q->type = type; q->owner = owner; q->pidx = q->cidx = q->inc_idx = 0; -- cgit v1.2.1