1. 13 Jul, 2020 5 commits
    • Suraj Upadhyay's avatar
      staging: qlge: Remove pci-dma-compat wrapper APIs. · ff98ca15
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h
      should go away as it creates unnecessary midlayering
      for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
      APIs directly.
      
      The patch has been generated with the coccinelle script below
      and 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_ATOMIC)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
      
      @@ 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, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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)
      Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Link: https://lore.kernel.org/r/20200711124633.GA16459@blackclownSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ff98ca15
    • Alexander A. Klimov's avatar
      Staging: speakup: Replace HTTP links with HTTPS ones · 5723a0dd
      Alexander A. Klimov authored
      Rationale:
      Reduces attack surface on kernel devs opening the links for MITM
      as HTTPS traffic is much harder to manipulate.
      
      Deterministic algorithm:
      For each file:
        If not .svg:
          For each line:
            If doesn't contain `\bxmlns\b`:
              For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
      	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
                  If both the HTTP and HTTPS versions
                  return 200 OK and serve the same content:
                    Replace HTTP with HTTPS.
      Signed-off-by: default avatarAlexander A. Klimov <grandmaster@al2klimov.de>
      Link: https://lore.kernel.org/r/20200713091305.32708-1-grandmaster@al2klimov.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5723a0dd
    • Suraj Upadhyay's avatar
      staging: rtl8192e: rtl_core: Remove pci-dma-compat wrapper APIs. · 8aaeac5b
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h
      should go away as it creates unnecessary midlayering
      for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
      APIs directly.
      
      The patch has been generated with the coccinelle script below
      and 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_ATOMIC)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
      
      @@ 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)
      Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Link: https://lore.kernel.org/r/20200711132349.GA21618@blackclownSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8aaeac5b
    • Suraj Upadhyay's avatar
      staging: rtl8192e: rtl8192E_dev: Remove pci-dma-compat wrapper APIs. · e4c9b73b
      Suraj Upadhyay authored
      The legacy API wrappers in include/linux/pci-dma-compat.h
      should go away as it creates unnecessary midlayering
      for include/linux/dma-mapping.h APIs, instead use dma-mapping.h
      APIs directly.
      
      The patch has been generated with the coccinelle script below
      and 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_ATOMIC)
      
      @@ expression E1, E2, E3; @@
      - pci_zalloc_consistent(E1, E2, E3)
      + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC)
      
      @@ 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, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_single(E1, E2, E3, E4)
      + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4, E5; @@
      - pci_map_page(E1, E2, E3, E4, E5)
      + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_page(E1, E2, E3, E4)
      + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_map_sg(E1, E2, E3, E4)
      + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4)
      
      @@ expression E1, E2, E3, E4; @@
      - pci_unmap_sg(E1, E2, E3, E4)
      + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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, (enum dma_data_direction)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)
      Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
      Link: https://lore.kernel.org/r/20200711131623.GA20537@blackclownSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4c9b73b
    • Gustavo A. R. Silva's avatar
      staging: rts5208: Assign array_size() to a variable · 8ffe5f36
      Gustavo A. R. Silva authored
      Assign array_size() to variable _size_ and use it in multiple places.
      
      This issue was found with the help of Coccinelle and, audited and fixed
      manually.
      
      Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Link: https://lore.kernel.org/r/20200710183350.GA8376@embeddedorSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8ffe5f36
  2. 10 Jul, 2020 16 commits
  3. 03 Jul, 2020 19 commits