Skip to contentSkip to conversation

mm/hugetlb: Make is_aligned_hugepage_range static

PATCH In review Zou Wei 2 participants 2 messages Oct 29, 2020 – Nov 6, 2020 MIPS

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 mm/hugetlb: Make is_aligned_hugepage_range static

Fix the following sparse warning:

arch/mips/mm/hugetlbpage.c:64:5: warning:
symbol 'is_aligned_hugepage_range' was not declared. Should it be static?

---
 arch/mips/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/hugetlbpage.c +1 -1
index 77ffece..774c988 100644
@@ -61,7 +61,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
 /*
  * This function checks for proper alignment of input addr and len parameters.
  */
-int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
+static int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
 {
 	if (len & ~HPAGE_MASK)
 		return -EINVAL;
Signature · 1 line
2.6.2
#1 lore raw
Quoted 16 lines · Zou Wei

Fix the following sparse warning:

arch/mips/mm/hugetlbpage.c:64:5: warning:
symbol 'is_aligned_hugepage_range' was not declared. Should it be static?

---
 arch/mips/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/hugetlbpage.c +0 -0
index 77ffece..774c988 100644

arch/mips/mm/hugetlbpage.c pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr, · line 64

Quoted 5 lines
arch/mips/mm/hugetlbpage.c +1 -1
@@ -61,7 +61,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
 /*
  * This function checks for proper alignment of input addr and len parameters.
  */
-int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
+static int is_aligned_hugepage_range(unsigned long addr, unsigned long len)

this should give then a warning that 'is_aligned_hugepage_range' is unused. Could you send a patch, which remove function completely ?

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]