linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hugetlb.c: Clean code by removing unnecessary initialization
@ 2020-03-03 21:23 mateusznosek0
  2020-03-04  2:20 ` Mike Kravetz
  0 siblings, 1 reply; 2+ messages in thread
From: mateusznosek0 @ 2020-03-03 21:23 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: Mateusz Nosek, mike.kravetz, akpm

From: Mateusz Nosek <mateusznosek0@gmail.com>

Previously variable 'check_addr' was initialized,
but was not read later before reassigning.
So the initialization can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
 mm/hugetlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index e4116385a4e1..7fb31750e670 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5021,7 +5021,7 @@ static bool vma_shareable(struct vm_area_struct *vma, unsigned long addr)
 void adjust_range_if_pmd_sharing_possible(struct vm_area_struct *vma,
 				unsigned long *start, unsigned long *end)
 {
-	unsigned long check_addr = *start;
+	unsigned long check_addr;
 
 	if (!(vma->vm_flags & VM_MAYSHARE))
 		return;
-- 
2.17.1



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

end of thread, other threads:[~2020-03-04  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 21:23 [PATCH] mm/hugetlb.c: Clean code by removing unnecessary initialization mateusznosek0
2020-03-04  2:20 ` Mike Kravetz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox