Skip to content

Commit

Permalink
fixup! add alloc_pages_exact alloc_size attributes
Browse files Browse the repository at this point in the history
The index parameter for the alloc_size GCC attribute should be '2'
instead of '1' as "size" is the second parameter to
alloc_pages_exact_nid().
  • Loading branch information
tsautereau-anssi authored and anthraxx committed Jul 17, 2018
1 parent 8f5e49b commit 8ad97d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/gfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ extern unsigned long get_zeroed_page(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) __attribute__((alloc_size(1)));
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)
Expand Down

0 comments on commit 8ad97d0

Please sign in to comment.