summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMateusz Nosek <mateusznosek0@gmail.com>2020-04-02 07:11:45 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 19:35:32 +0300
commit353b2de42e84a8c47be6326e935c58135843eac8 (patch)
tree11a4699610d1310fb6148696aefb2f90785dcdee /mm
parent6566704dafddcdff4b2a794da5b030b74e74107f (diff)
downloadlinux-353b2de42e84a8c47be6326e935c58135843eac8.tar.xz
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 <mateusznosek0@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Link: http://lkml.kernel.org/r/20200303212354.25226-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-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;