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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 30 Nov 2020 19:19:09 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Heiner Kallweit <hkallweit1@...il.com>, jiri@...dia.com,
        idosch@...dia.com, davem@...emloft.net, kuba@...nel.org
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mlxsw: switch from 'pci_' to 'dma_' API

Le 29/11/2020 à 22:46, Heiner Kallweit a écrit :
> Am 29.11.2020 um 22:17 schrieb Christophe JAILLET:
>> @@ -1817,17 +1817,17 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>>   		goto err_pci_request_regions;
>>   	}
>>   
>> -	err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
>> +	err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
> 
> Using dma_set_mask_and_coherent() would be better here.
> 
>>   	if (!err) {
>> -		err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
>> +		err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
>>   		if (err) {
> 
> This check isn't needed, see comment at definition of
> dma_set_mask_and_coherent().
> 

Hi,

Correct, but I didn't want to mix several things in the same commit.
This one is dedicated to automatically generated changes done with 
coccinelle.

I plan to have another set of such clean-ups once "wrappers in 
include/linux/pci-dma-compat.h are gone"

However, if it is prefered to have only one patch, I can resubmit.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ