diff --git a/fs/namei.c b/fs/namei.c
index bd313d680d34ef466af23765413cbd709c540c98..99a34717b2b08611d75c106249b63e9ef7667d1d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1455,15 +1455,10 @@ unsigned int full_name_hash(const unsigned char *name, unsigned int len)
 }
 EXPORT_SYMBOL(full_name_hash);
 
-#ifdef CONFIG_64BIT
-#define ONEBYTES	0x0101010101010101ul
-#define SLASHBYTES	0x2f2f2f2f2f2f2f2ful
-#define HIGHBITS	0x8080808080808080ul
-#else
-#define ONEBYTES	0x01010101ul
-#define SLASHBYTES	0x2f2f2f2ful
-#define HIGHBITS	0x80808080ul
-#endif
+#define REPEAT_BYTE(x)	((~0ul / 0xff) * (x))
+#define ONEBYTES	REPEAT_BYTE(0x01)
+#define SLASHBYTES	REPEAT_BYTE('/')
+#define HIGHBITS	REPEAT_BYTE(0x80)
 
 /* Return the high bit set in the first byte that is a zero */
 static inline unsigned long has_zero(unsigned long a)