lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 09 Aug 2020 01:10:46 -0700
From:   Joe Perches <joe@...ches.com>
To:     Suraj Upadhyay <usuraj35@...il.com>, dledford@...hat.com,
        jgg@...pe.ca, galpress@...zon.com, sleybo@...zon.com
Cc:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 5/4] RDMA/efa : Remove pci-dma-compat wrapper APIs

On Sun, 2020-08-09 at 13:15 +0530, Suraj Upadhyay wrote:
> 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.
[]
> diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c
[]
> @@ -405,13 +405,13 @@ static int efa_device_init(struct efa_com_dev *edev, struct pci_dev *pdev)
>                 return err;
>         }
> 
> -       err = pci_set_dma_mask(pdev, DMA_BIT_MASK(dma_width));
> +       err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(dma_width));
>         if (err) {
>                 dev_err(&pdev->dev, "pci_set_dma_mask failed %d\n", err);

Coccinelle is great for some things, but not
necessarily for these sorts of changes in an
completely automated way.

The dev_err messages also need to be changed
as the format string contains the old name.

> -       err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(dma_width));
> +       err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(dma_width));
>         if (err) {
>                 dev_err(&pdev->dev,
>                         "err_pci_set_consistent_dma_mask failed %d\n",



Powered by blists - more mailing lists