Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: hugetlb.c make functions static, use NULL rather than 0

mm/hugetlb.c:265:17: warning: symbol 'resv_map_alloc' was not declared. Should it be static?
mm/hugetlb.c:277:6: warning: symbol 'resv_map_release' was not declared. Should it be static?
mm/hugetlb.c:292:9: warning: Using plain integer as NULL pointer
mm/hugetlb.c:1750:5: warning: symbol 'unmap_ref_private' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Harvey Harrison and committed by
Linus Torvalds
2a4b3ded db64fe02

+5 -7
+5 -7
mm/hugetlb.c
··· 262 262 struct list_head regions; 263 263 }; 264 264 265 - struct resv_map *resv_map_alloc(void) 265 + static struct resv_map *resv_map_alloc(void) 266 266 { 267 267 struct resv_map *resv_map = kmalloc(sizeof(*resv_map), GFP_KERNEL); 268 268 if (!resv_map) ··· 274 274 return resv_map; 275 275 } 276 276 277 - void resv_map_release(struct kref *ref) 277 + static void resv_map_release(struct kref *ref) 278 278 { 279 279 struct resv_map *resv_map = container_of(ref, struct resv_map, refs); 280 280 ··· 289 289 if (!(vma->vm_flags & VM_SHARED)) 290 290 return (struct resv_map *)(get_vma_private_data(vma) & 291 291 ~HPAGE_RESV_MASK); 292 - return 0; 292 + return NULL; 293 293 } 294 294 295 295 static void set_vma_resv_map(struct vm_area_struct *vma, struct resv_map *map) ··· 1747 1747 * from other VMAs and let the children be SIGKILLed if they are faulting the 1748 1748 * same region. 1749 1749 */ 1750 - int unmap_ref_private(struct mm_struct *mm, 1751 - struct vm_area_struct *vma, 1752 - struct page *page, 1753 - unsigned long address) 1750 + static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma, 1751 + struct page *page, unsigned long address) 1754 1752 { 1755 1753 struct vm_area_struct *iter_vma; 1756 1754 struct address_space *mapping;