aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Nosek <[email protected]>2020-04-01 21:11:45 -0700
committerLinus Torvalds <[email protected]>2020-04-02 09:35:32 -0700
commit353b2de42e84a8c47be6326e935c58135843eac8 (patch)
tree11a4699610d1310fb6148696aefb2f90785dcdee
parent6566704dafddcdff4b2a794da5b030b74e74107f (diff)
mm/hugetlb.c: clean code by removing unnecessary initialization
Previously variable 'check_addr' was initialized, but was not read later before reassigning. So the initialization can be removed. Signed-off-by: Mateusz Nosek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/hugetlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 3fd9f24fcf7c..4b84640fedf4 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5156,7 +5156,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;