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]
Message-ID: <nycvar.YFH.7.76.2201240916280.28059@cbobk.fhfr.pm>
Date:   Mon, 24 Jan 2022 09:16:38 +0100 (CET)
From:   Jiri Kosina <jikos@...nel.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
cc:     Nehal Shah <nehal-bakulchandra.shah@....com>,
        Basavaraj Natikar <basavaraj.natikar@....com>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-input@...r.kernel.org
Subject: Re: [PATCH] HID: amd_sfh: Remove useless DMA-32 fallback
 configuration

On Sat, 15 Jan 2022, Christophe JAILLET wrote:

> As stated in [1], dma_set_mask() with a 64-bit mask never fails if
> dev->dma_mask is non-NULL.
> So, if it fails, the 32 bits case will also fail for the same reason.
> 
> Simplify code and remove some dead code accordingly.
> 
> [1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 2503be0253d3..673536d1d9ba 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -248,11 +248,8 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
>  	pci_set_master(pdev);
>  	rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
>  	if (rc) {
> -		rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> -		if (rc) {
> -			dev_err(&pdev->dev, "failed to set DMA mask\n");
> -			return rc;
> -		}
> +		dev_err(&pdev->dev, "failed to set DMA mask\n");
> +		return rc;
>  	}

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ