]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[PATCH] x86_64: check_addr() cleanups
authorAndrew Morton <akpm@osdl.org>
Mon, 26 Jun 2006 11:59:05 +0000 (13:59 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 17:48:20 +0000 (10:48 -0700)
 - Use DMA_32BIT_MASK

 - Use %z for size_t

 - 80-cols

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/pci-nommu.c

index 1f6ecc62061d9121633e53edf672dec81b2da7c3..c4c3cc36ac5b033997d5904fa5adff8fa4de54b8 100644 (file)
@@ -4,6 +4,8 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/string.h>
+#include <linux/dma-mapping.h>
+
 #include <asm/proto.h>
 #include <asm/processor.h>
 #include <asm/dma.h>
@@ -12,10 +14,11 @@ static int
 check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
 {
         if (hwdev && bus + size > *hwdev->dma_mask) {
-               if (*hwdev->dma_mask >= 0xffffffffULL)
+               if (*hwdev->dma_mask >= DMA_32BIT_MASK)
                        printk(KERN_ERR
-                           "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
-                               name, (long long)bus, size, (long long)*hwdev->dma_mask);
+                           "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
+                               name, (long long)bus, size,
+                               (long long)*hwdev->dma_mask);
                return 0;
        }
        return 1;