1. 02 Sep, 2020 3 commits
  2. 01 Sep, 2020 2 commits
  3. 25 Aug, 2020 19 commits
    • Alex Dewar's avatar
      scsi: esas2r: Remove unnecessary casts · 32417d78
      Alex Dewar authored
      In a number of places in esas2r_ioctl.c, the void* returned from
      pci_alloc_consistent() is cast unnecessarily. Remove casts.
      
      Issue identified with Coccinelle.
      
      Link: https://lore.kernel.org/r/20200820181411.866057-1-alex.dewar90@gmail.comSigned-off-by: default avatarAlex Dewar <alex.dewar90@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      32417d78
    • Tianjia Zhang's avatar
      scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() · 44f4daf8
      Tianjia Zhang authored
      On an error exit path, a negative error code should be returned instead of
      a positive return value.
      
      Link: https://lore.kernel.org/r/20200802111531.5065-1-tianjia.zhang@linux.alibaba.com
      Fixes: f40e74ff ("csiostor:firmware upgrade fix")
      Cc: Praveen Madhavan <praveenm@chelsio.com>
      Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      44f4daf8
    • Tianjia Zhang's avatar
      scsi: qla2xxx: Fix wrong return value in qla_nvme_register_hba() · ca4fb89a
      Tianjia Zhang authored
      On an error exit path, a negative error code should be returned instead of
      a positive return value.
      
      Link: https://lore.kernel.org/r/20200802111530.5020-1-tianjia.zhang@linux.alibaba.com
      Fixes: 8777e431 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine")
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ca4fb89a
    • Tianjia Zhang's avatar
      scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg() · bbf2d06a
      Tianjia Zhang authored
      In the case of a failed retry, a positive value EIO is returned here.  I
      think this is a typo error. It is necessary to return an error value.
      
      [mkp: caller checks != 0 but the rest of the file uses -Exxx so fix this up
      to be consistent]
      
      Link: https://lore.kernel.org/r/20200802111528.4974-1-tianjia.zhang@linux.alibaba.com
      Fixes: 0691094f ("scsi: qla2xxx: Add logic to detect ABTS hang and response completion")
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      bbf2d06a
    • Tianjia Zhang's avatar
      scsi: qla2xxx: Remove redundant variable initialization · 8905cbda
      Tianjia Zhang authored
      The initialization value of `rc` is wrong. It is unnecessary to initialize
      `rc` variables, so remove its initialization operation.
      
      Link: https://lore.kernel.org/r/20200802111527.4928-1-tianjia.zhang@linux.alibaba.com
      Fixes: 84905dfe ("scsi: qla2xxx: Fix TMF and Multi-Queue config")
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8905cbda
    • Tong Zhang's avatar
      scsi: aic7xxx: Fix error code handling · 715f43c6
      Tong Zhang authored
      ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), but
      the caller is checking error case using != 0.
      
      Link: https://lore.kernel.org/r/20200816070242.978839-1-ztong0001@gmail.comSigned-off-by: default avatarTong Zhang <ztong0001@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      715f43c6
    • Colin Ian King's avatar
      a9b83986
    • Colin Ian King's avatar
      scsi: csiostor: Fix spelling mistake "couldnt" -> "couldn't" · 29779a22
      Colin Ian King authored
      There are spelling mistakes in two comments and a csio_err error
      message. Fix these.
      
      Link: https://lore.kernel.org/r/20200810090843.49553-1-colin.king@canonical.comSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      29779a22
    • Colin Ian King's avatar
      886a0b54
    • Colin Ian King's avatar
      scsi: snic: Fix spelling mistakes of "Queueing" · cb562b13
      Colin Ian King authored
      There are two different spelling mistakes of "Queueing" in error and debug
      messages. Fix these.
      
      Link: https://lore.kernel.org/r/20200810080745.47314-1-colin.king@canonical.comSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      cb562b13
    • Christophe JAILLET's avatar
      scsi: qla2xxx: Fix the size used in a 'dma_free_coherent()' call · 650b323c
      Christophe JAILLET authored
      Update the size used in 'dma_free_coherent()' in order to match the one
      used in the corresponding 'dma_alloc_coherent()'.
      
      [mkp: removed memset() hunk that has already been addressed]
      
      Link: https://lore.kernel.org/r/20200802110721.677707-1-christophe.jaillet@wanadoo.fr
      Fixes: 4161cee5 ("[SCSI] qla4xxx: Add host statistics support")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      650b323c
    • Christophe JAILLET's avatar
      scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()' · 574918e6
      Christophe JAILLET authored
      Update the size used in 'dma_free_coherent()' in order to match the one
      used in the corresponding 'dma_alloc_coherent()'.
      
      Link: https://lore.kernel.org/r/20200802101527.676054-1-christophe.jaillet@wanadoo.fr
      Fixes: 4161cee5 ("[SCSI] qla4xxx: Add host statistics support")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      574918e6
    • Suraj Upadhyay's avatar
      scsi: megaraid: Remove pci-dma-compat wrapper API · ec090ef8
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.  And has
      been hand modified to replace each GFP_ with a correct flag depending upon
      the context.  Compile tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/635cfc08b83a041708ee6afbc430087416f2605c.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ec090ef8
    • Suraj Upadhyay's avatar
      scsi: qla2xxx: Remove pci-dma-compat wrapper API · 8d1f1ffa
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.  Compile
      tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/24627a86cf1e67fd229bc323316523d1ba0811f9.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8d1f1ffa
    • Suraj Upadhyay's avatar
      scsi: hpsa: Remove pci-dma-compat wrapper API · 8f31fa53
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.  Compile
      tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/37154a4efe82a58b9bad143608dd9fd37a2c94e5.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8f31fa53
    • Suraj Upadhyay's avatar
      scsi: mpt3sas: Remove pci-dma-compat wrapper API · a5a20c4a
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.  Compile
      tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/e825ac7108092cc8fa8d462dc702098ef10fc6a2.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a5a20c4a
    • Suraj Upadhyay's avatar
      scsi: dc395x: Remove pci-dma-compat wrapper API · ece0eeff
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.
      Compile tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/b8acc51ec774507050a9e9e8edf28e4933322a9e.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ece0eeff
    • Suraj Upadhyay's avatar
      scsi: aic7xxx: Remove pci-dma-compat wrapper API · daf4b00b
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.  And has
      been hand modified to replace each GFP_ with the correct flag depending
      upon the context.  Compile-tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/790a8751b5c2b5393c3021b8def08e47bb1597c0.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      daf4b00b
    • Suraj Upadhyay's avatar
      scsi: aacraid: Remove pci-dma-compat wrapper API · e555cd5f
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
      they create unnecessary midlayering for include/linux/dma-mapping.h API.
      Instead use dma-mapping.h API directly.
      
      The patch has been generated with the coccinelle script below.
      Compile-tested.
      
      @@@@
      - PCI_DMA_BIDIRECTIONAL
      + DMA_BIDIRECTIONAL
      
      @@@@
      - PCI_DMA_TODEVICE
      + DMA_TO_DEVICE
      
      @@@@
      - PCI_DMA_FROMDEVICE
      + DMA_FROM_DEVICE
      
      @@@@
      - PCI_DMA_NONE
      + DMA_NONE
      
      @@ expression E1, E2, E3; @@
      - pci_alloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_free_consistent(E1, E2, E3, E4)
      + dma_free_coherent(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_single(E1, E2, E3, E4)
      + dma_map_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
      + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_single_for_device(E1, E2, E3, E4)
      + dma_sync_single_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
      + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
      + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)
      
      @@ expression E1, E2; @@
      - pci_dma_mapping_error(E1, E2)
      + dma_mapping_error(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_consistent_dma_mask(E1, E2)
      + dma_set_coherent_mask(&E1->dev, E2)
      
      @@ expression E1, E2; @@
      - pci_set_dma_mask(E1, E2)
      + dma_set_mask(&E1->dev, E2)
      
      Link: https://lore.kernel.org/r/f8d4778440d55ba26c04eef0f7d63fb211a39443.1596045683.git.usuraj35@gmail.comSigned-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      e555cd5f
  4. 21 Aug, 2020 16 commits