Message ID | 20200303212354.25226-1-mateusznosek0@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/hugetlb.c: Clean code by removing unnecessary initialization | expand |
On 3/3/20 1:23 PM, mateusznosek0@gmail.com wrote: > 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> Thanks, that is indeed not needed. Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
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;