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-next>] [day] [month] [year] [list]
Message-Id: <1303882443-7613-1-git-send-email-aurelien@aurel32.net>
Date:	Wed, 27 Apr 2011 07:34:02 +0200
From:	Aurelien Jarno <aurelien@...el32.net>
To:	David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org
Cc:	linux-kernel@...r.kernel.org, Aurelien Jarno <aurelien@...el32.net>
Subject: [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error()

... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.

Signed-off-by: Aurelien Jarno <aurelien@...el32.net>
---
 drivers/gpu/drm/radeon/radeon_gart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 8a955bb..d96f5ea 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -183,7 +183,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
 	for (i = 0; i < pages; i++, p++) {
 		/* On TTM path, we only use the DMA API if TTM_PAGE_FLAG_DMA32
 		 * is requested. */
-		if (dma_addr[i] != DMA_ERROR_CODE) {
+		if (pci_dma_mapping_error(rdev->pdev, dma_addr[i])) {
 			rdev->gart.ttm_alloced[p] = true;
 			rdev->gart.pages_addr[p] = dma_addr[i];
 		} else {
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ