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]
Date:	Mon, 22 Oct 2007 04:47:30 +0200
From:	Adrian Bunk <bunk@...nel.org>
To:	Ralf Baechle <ralf@...ux-mips.org>, lethal@...ux-sh.org
Cc:	linuxsh-shmedia-dev@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: [2.6 patch] sh64: fix dma_cache_sync() compilation

This patch fixes the following compile error caused by
commit 622a9edd919de98ef59571ae6c40c7458244e3f2:

<--  snip  -->

...
  CC      init/main.o
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/dma-mapping.h:52,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/dmaengine.h:29,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/skbuff.h:29,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/netlink.h:155,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/genetlink.h:4,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/net/genetlink.h:4,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/taskstats_kern.h:12,
                 from /home/bunk/linux/kernel-2.6/git/linux-2.6/init/main.c:46:
include2/asm/dma-mapping.h: In function 'dma_cache_sync':
include2/asm/dma-mapping.h:46: error: invalid operands to binary & (have 'void *' and 'int')
make[2]: *** [init/main.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@...nel.org>

---
e4e74353f092fa502d4c7e9c3c16a0d7a3bcf85e 
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index e661857..e57f129 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
 				  enum dma_data_direction dir)
 {
-	unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK;
-	unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK;
+	unsigned long start = (unsigned long) vaddr;
+	unsigned long s = start & L1_CACHE_ALIGN_MASK;
+	unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK;
 
 	for (; s <= e; s += L1_CACHE_BYTES)
 		asm volatile ("ocbp	%0, 0" : : "r" (s));
-
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