Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602791 > unrolled thread

[PATCH 1/2] x86: asm/bitops.h

Started byJoakim Tjernlund <joakim.tjernlund@infinera.com>
First post2017-03-16 20:20 +0100
Last post2017-03-16 20:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] x86: asm/bitops.h Joakim Tjernlund <joakim.tjernlund@infinera.com> - 2017-03-16 20:20 +0100
    Re: [PATCH 1/2] x86: asm/bitops.h Andrew Morton <akpm@linux-foundation.org> - 2017-03-16 20:50 +0100

#1602791 — [PATCH 1/2] x86: asm/bitops.h

FromJoakim Tjernlund <joakim.tjernlund@infinera.com>
Date2017-03-16 20:20 +0100
Subject[PATCH 1/2] x86: asm/bitops.h
Message-ID<tlJ6h-2QJ-5@gated-at.bofh.it>
Replace void * cast with uintptr_t to do pointer arithmetic's

Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 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

[toc] | [next] | [standalone]


#1602809

FromAndrew Morton <akpm@linux-foundation.org>
Date2017-03-16 20:50 +0100
Message-ID<tlJzj-33w-3@gated-at.bofh.it>
In reply to#1602791
On Thu, 16 Mar 2017 20:07:08 +0100 Joakim Tjernlund <joakim.tjernlund@infinera.com> wrote:

> Replace void * cast with uintptr_t to do pointer arithmetic's

Why?  The changelog doesn't describe whats wrong with the current code
and gives nobody any reason to apply the patch.

> Cc: <stable@vger.kernel.org> # v4.9+

And you think it should be backported!  That makes it even more
important that the changelog contain a full description of the
end-user visible impact of the fix.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web