lkml.org 
[lkml]   [2017]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCHv2 1/2] x86: asm/bitops.h
Date
VirtualBox modules complains when doing pointer arithmetic's,
replace void * cast with uintptr_t to do pointer arithmetic's
in integer space instead.

Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
v2 - Improve wording

arch/x86/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 8540227..b561304 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -50,7 +50,7 @@
* a mask operation on a byte.
*/
#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr))
-#define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3))
+#define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((uintptr_t)(addr) + ((nr)>>3))
#define CONST_MASK(nr) (1 << ((nr) & 7))

/**
--
2.10.2
\
 
 \ /
  Last update: 2017-03-17 18:17    [W:0.037 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site