linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/mmap.c: silence variable 'new_start' set but not used
@ 2019-07-24 14:07 YueHaibing
  2019-07-24 14:11 ` Qian Cai
  2019-07-24 14:34 ` Kirill A. Shutemov
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2019-07-24 14:07 UTC (permalink / raw)
  To: akpm, kirill.shutemov, mhocko, vbabka, yang.shi, jannh, walken
  Cc: linux-kernel, linux-mm, YueHaibing

'new_start' is used in is_hugepage_only_range(),
which do nothing in some arch. gcc will warning:

mm/mmap.c: In function acct_stack_growth:
mm/mmap.c:2311:16: warning: variable new_start set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 mm/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index e2dbed3..56c2a92 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2308,7 +2308,7 @@ static int acct_stack_growth(struct vm_area_struct *vma,
 			     unsigned long size, unsigned long grow)
 {
 	struct mm_struct *mm = vma->vm_mm;
-	unsigned long new_start;
+	unsigned long __maybe_unused new_start;
 
 	/* address space limit tests */
 	if (!may_expand_vm(mm, vma->vm_flags, grow))
-- 
2.7.4



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

end of thread, other threads:[~2019-07-25  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 14:07 [PATCH] mm/mmap.c: silence variable 'new_start' set but not used YueHaibing
2019-07-24 14:11 ` Qian Cai
2019-07-24 14:17   ` Michal Hocko
2019-07-24 14:34 ` Kirill A. Shutemov
2019-07-25  9:30   ` Yuehaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).