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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Sep 2013 22:57:02 +0100
From:	Russell King <rmk+kernel@....linux.org.uk>
To:	alsa-devel@...a-project.org, b43-dev@...ts.infradead.org,
	devel@...verdev.osuosl.org, devicetree@...r.kernel.org,
	dri-devel@...ts.freedesktop.org, e1000-devel@...ts.sourceforge.net,
	linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-fbdev@...r.kernel.org,
	linux-ide@...r.kernel.org, linux-media@...r.kernel.org,
	linux-mmc@...r.kernel.org, linux-nvme@...ts.infradead.org,
	linux-omap@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	linux-samsung-soc@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-tegra@...r.kernel.org, linux-usb@...r.kernel.org,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
	uclinux-dist-devel@...ckfin.uclinux.org
Cc:	Chris Ball <cjb@...top.org>
Subject: [PATCH 32/51] DMA-API: mmc: sdhci-acpi: use
 dma_coerce_mask_and_coherent()

The code sequence:
	dev->dma_mask = &dev->coherent_dma_mask;
	dev->coherent_dma_mask = dma_mask;
bypasses the architectures check on the DMA mask.  It can be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.

Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
---
 drivers/mmc/host/sdhci-acpi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index cdd4ce0..ef19874 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -310,8 +310,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 			dma_mask = DMA_BIT_MASK(32);
 		}
 
-		dev->dma_mask = &dev->coherent_dma_mask;
-		dev->coherent_dma_mask = dma_mask;
+		err = dma_coerce_mask_and_coherent(dev, dma_mask);
+		if (err)
+			goto err_free;
 	}
 
 	if (c->slot) {
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ