Commit 8fa3d6fc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] x86_64: check_addr() cleanups

 - Use DMA_32BIT_MASK

 - Use %z for size_t

 - 80-cols

Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5f51e139
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/dma-mapping.h>
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/dma.h> #include <asm/dma.h>
...@@ -12,10 +14,11 @@ static int ...@@ -12,10 +14,11 @@ static int
check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
{ {
if (hwdev && bus + size > *hwdev->dma_mask) { if (hwdev && bus + size > *hwdev->dma_mask) {
if (*hwdev->dma_mask >= 0xffffffffULL) if (*hwdev->dma_mask >= DMA_32BIT_MASK)
printk(KERN_ERR printk(KERN_ERR
"nommu_%s: overflow %Lx+%lu of device mask %Lx\n", "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
name, (long long)bus, size, (long long)*hwdev->dma_mask); name, (long long)bus, size,
(long long)*hwdev->dma_mask);
return 0; return 0;
} }
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment