From 689144b1720990cd788f78530ef5ce61899571e5 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 14 May 2017 16:53:59 -0400 Subject: [PATCH] add alloc_pages_exact alloc_size attributes Edited-by: Thibaut Sautereau Signed-off-by: Daniel Micay Signed-off-by: anupritaisno1 --- include/linux/gfp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e6fdbd538..44677ed8e 100755 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -591,9 +591,9 @@ static inline struct page *alloc_pages(gfp_t gfp_mask, unsigned int order) extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); extern unsigned long get_zeroed_page(gfp_t gfp_mask); -void *alloc_pages_exact(size_t size, gfp_t gfp_mask); +void *alloc_pages_exact(size_t size, gfp_t gfp_mask) __attribute__((alloc_size(1))); void free_pages_exact(void *virt, size_t size); -void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); +void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) __attribute__((alloc_size(2))); #define __get_free_page(gfp_mask) \ __get_free_pages((gfp_mask), 0)