Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: efct: Don't pass GFP_DMA to dma_alloc_coherent()

dma_alloc_coherent() ignores the zone specifiers so this is pointless and
confusing.

Link: https://lore.kernel.org/r/20211214163605.416288-1-hch@lst.de
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
efac162a 99c66a88

+18 -18
+1 -1
drivers/scsi/elx/efct/efct_driver.c
··· 261 261 262 262 dma.size = FW_WRITE_BUFSIZE; 263 263 dma.virt = dma_alloc_coherent(&efct->pci->dev, 264 - dma.size, &dma.phys, GFP_DMA); 264 + dma.size, &dma.phys, GFP_KERNEL); 265 265 if (!dma.virt) 266 266 return -ENOMEM; 267 267
+5 -5
drivers/scsi/elx/efct/efct_hw.c
··· 516 516 dma = &hw->xfer_rdy; 517 517 dma->size = sizeof(struct fcp_txrdy) * hw->config.n_io; 518 518 dma->virt = dma_alloc_coherent(&efct->pci->dev, 519 - dma->size, &dma->phys, GFP_DMA); 519 + dma->size, &dma->phys, GFP_KERNEL); 520 520 if (!dma->virt) 521 521 return -ENOMEM; 522 522 } ··· 562 562 sizeof(struct sli4_sge); 563 563 dma->virt = dma_alloc_coherent(&efct->pci->dev, 564 564 dma->size, &dma->phys, 565 - GFP_DMA); 565 + GFP_KERNEL); 566 566 if (!dma->virt) { 567 567 efc_log_err(hw->os, "dma_alloc fail %d\n", i); 568 568 memset(&io->def_sgl, 0, ··· 618 618 memset(&req, 0, sizeof(struct efc_dma)); 619 619 req.size = 32 + sgls_per_request * 16; 620 620 req.virt = dma_alloc_coherent(&efct->pci->dev, req.size, &req.phys, 621 - GFP_DMA); 621 + GFP_KERNEL); 622 622 if (!req.virt) { 623 623 kfree(sgls); 624 624 return -ENOMEM; ··· 1063 1063 dma = &hw->loop_map; 1064 1064 dma->size = SLI4_MIN_LOOP_MAP_BYTES; 1065 1065 dma->virt = dma_alloc_coherent(&hw->os->pci->dev, dma->size, &dma->phys, 1066 - GFP_DMA); 1066 + GFP_KERNEL); 1067 1067 if (!dma->virt) 1068 1068 return -EIO; 1069 1069 ··· 1192 1192 prq->dma.virt = dma_alloc_coherent(&efct->pci->dev, 1193 1193 prq->dma.size, 1194 1194 &prq->dma.phys, 1195 - GFP_DMA); 1195 + GFP_KERNEL); 1196 1196 if (!prq->dma.virt) { 1197 1197 efc_log_err(hw->os, "DMA allocation failed\n"); 1198 1198 kfree(rq_buf);
+1 -1
drivers/scsi/elx/efct/efct_io.c
··· 48 48 io->rspbuf.size = SCSI_RSP_BUF_LENGTH; 49 49 io->rspbuf.virt = dma_alloc_coherent(&efct->pci->dev, 50 50 io->rspbuf.size, 51 - &io->rspbuf.phys, GFP_DMA); 51 + &io->rspbuf.phys, GFP_KERNEL); 52 52 if (!io->rspbuf.virt) { 53 53 efc_log_err(efct, "dma_alloc rspbuf failed\n"); 54 54 efct_io_pool_free(io_pool);
+2 -2
drivers/scsi/elx/libefc/efc_cmds.c
··· 179 179 nport->dma.size = EFC_SPARAM_DMA_SZ; 180 180 nport->dma.virt = dma_alloc_coherent(&efc->pci->dev, 181 181 nport->dma.size, &nport->dma.phys, 182 - GFP_DMA); 182 + GFP_KERNEL); 183 183 if (!nport->dma.virt) { 184 184 efc_log_err(efc, "Failed to allocate DMA memory\n"); 185 185 efc_nport_free_resources(nport, EFC_EVT_NPORT_ALLOC_FAIL, data); ··· 466 466 domain->dma.size = EFC_SPARAM_DMA_SZ; 467 467 domain->dma.virt = dma_alloc_coherent(&efc->pci->dev, 468 468 domain->dma.size, 469 - &domain->dma.phys, GFP_DMA); 469 + &domain->dma.phys, GFP_KERNEL); 470 470 if (!domain->dma.virt) { 471 471 efc_log_err(efc, "Failed to allocate DMA memory\n"); 472 472 return -EIO;
+2 -2
drivers/scsi/elx/libefc/efc_els.c
··· 71 71 /* now allocate DMA for request and response */ 72 72 els->io.req.size = reqlen; 73 73 els->io.req.virt = dma_alloc_coherent(&efc->pci->dev, els->io.req.size, 74 - &els->io.req.phys, GFP_DMA); 74 + &els->io.req.phys, GFP_KERNEL); 75 75 if (!els->io.req.virt) { 76 76 mempool_free(els, efc->els_io_pool); 77 77 spin_unlock_irqrestore(&node->els_ios_lock, flags); ··· 80 80 81 81 els->io.rsp.size = rsplen; 82 82 els->io.rsp.virt = dma_alloc_coherent(&efc->pci->dev, els->io.rsp.size, 83 - &els->io.rsp.phys, GFP_DMA); 83 + &els->io.rsp.phys, GFP_KERNEL); 84 84 if (!els->io.rsp.virt) { 85 85 dma_free_coherent(&efc->pci->dev, els->io.req.size, 86 86 els->io.req.virt, els->io.req.phys);
+7 -7
drivers/scsi/elx/libefc_sli/sli4.c
··· 445 445 446 446 dma->size = payload_size; 447 447 dma->virt = dma_alloc_coherent(&sli4->pci->dev, dma->size, 448 - &dma->phys, GFP_DMA); 448 + &dma->phys, GFP_KERNEL); 449 449 if (!dma->virt) 450 450 return -EIO; 451 451 ··· 508 508 509 509 q->dma.size = size * n_entries; 510 510 q->dma.virt = dma_alloc_coherent(&sli4->pci->dev, q->dma.size, 511 - &q->dma.phys, GFP_DMA); 511 + &q->dma.phys, GFP_KERNEL); 512 512 if (!q->dma.virt) { 513 513 memset(&q->dma, 0, sizeof(struct efc_dma)); 514 514 efc_log_err(sli4, "%s allocation failed\n", SLI4_QNAME[qtype]); ··· 849 849 850 850 dma->size = payload_size; 851 851 dma->virt = dma_alloc_coherent(&sli4->pci->dev, dma->size, 852 - &dma->phys, GFP_DMA); 852 + &dma->phys, GFP_KERNEL); 853 853 if (!dma->virt) 854 854 return -EIO; 855 855 ··· 4413 4413 psize = sizeof(struct sli4_rsp_cmn_get_cntl_addl_attributes); 4414 4414 data.size = psize; 4415 4415 data.virt = dma_alloc_coherent(&sli4->pci->dev, data.size, 4416 - &data.phys, GFP_DMA); 4416 + &data.phys, GFP_KERNEL); 4417 4417 if (!data.virt) { 4418 4418 memset(&data, 0, sizeof(struct efc_dma)); 4419 4419 efc_log_err(sli4, "Failed to allocate memory for GET_CNTL_ADDL_ATTR\n"); ··· 4653 4653 */ 4654 4654 sli4->bmbx.size = SLI4_BMBX_SIZE + sizeof(struct sli4_mcqe); 4655 4655 sli4->bmbx.virt = dma_alloc_coherent(&pdev->dev, sli4->bmbx.size, 4656 - &sli4->bmbx.phys, GFP_DMA); 4656 + &sli4->bmbx.phys, GFP_KERNEL); 4657 4657 if (!sli4->bmbx.virt) { 4658 4658 memset(&sli4->bmbx, 0, sizeof(struct efc_dma)); 4659 4659 efc_log_err(sli4, "bootstrap mailbox allocation failed\n"); ··· 4674 4674 sli4->vpd_data.virt = dma_alloc_coherent(&pdev->dev, 4675 4675 sli4->vpd_data.size, 4676 4676 &sli4->vpd_data.phys, 4677 - GFP_DMA); 4677 + GFP_KERNEL); 4678 4678 if (!sli4->vpd_data.virt) { 4679 4679 memset(&sli4->vpd_data, 0, sizeof(struct efc_dma)); 4680 4680 /* Note that failure isn't fatal in this specific case */ ··· 5070 5070 payload_dma->size = payload_size; 5071 5071 payload_dma->virt = dma_alloc_coherent(&sli4->pci->dev, 5072 5072 payload_dma->size, 5073 - &payload_dma->phys, GFP_DMA); 5073 + &payload_dma->phys, GFP_KERNEL); 5074 5074 if (!payload_dma->virt) { 5075 5075 memset(payload_dma, 0, sizeof(struct efc_dma)); 5076 5076 efc_log_err(sli4, "mbox payload memory allocation fail\n");