1. 25 Aug, 2020 12 commits
    • 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
  2. 21 Aug, 2020 28 commits