public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/hugetlb: ensure signedness of large numbers
@ 2019-12-28 10:33 isidentical
  2019-12-28 10:33 ` isidentical
  2019-12-29  1:31 ` James Bottomley
  0 siblings, 2 replies; 4+ messages in thread
From: isidentical @ 2019-12-28 10:33 UTC (permalink / raw)
  Cc: isidentical, Arnd Bergmann, linux-arch, linux-kernel

This change introduces a sanitity helper for
numbers that are larger than 2^5.

Signed-off-by: isidentical <batuhanosmantaskaya@gmail.com>
---
 include/uapi/asm-generic/hugetlb_encode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/asm-generic/hugetlb_encode.h b/include/uapi/asm-generic/hugetlb_encode.h
index b0f8e87235bd..42c06c62ae17 100644
--- a/include/uapi/asm-generic/hugetlb_encode.h
+++ b/include/uapi/asm-generic/hugetlb_encode.h
@@ -31,6 +31,6 @@
 #define HUGETLB_FLAG_ENCODE_512MB	(29 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_1GB		(30 << HUGETLB_FLAG_ENCODE_SHIFT)
 #define HUGETLB_FLAG_ENCODE_2GB		(31 << HUGETLB_FLAG_ENCODE_SHIFT)
-#define HUGETLB_FLAG_ENCODE_16GB	(34 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_16GB	(UINT32_C(34) << HUGETLB_FLAG_ENCODE_SHIFT)
 
 #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-29  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-28 10:33 [PATCH] mm/hugetlb: ensure signedness of large numbers isidentical
2019-12-28 10:33 ` isidentical
2019-12-29  1:31 ` James Bottomley
2019-12-29  1:31   ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox