Skip to contentSkip to conversation

mm: vmalloc: remove redundant asignmnet in unmap_kernel_range_noflush()

PATCH Applied Mike Rapoport 2 participants 2 messages Jul 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: vmalloc: remove redundant asignmnet in unmap_kernel_range_noflush()

From: Mike Rapoport <[email protected]>

'addr' is set to 'start' and then a few lines afterwards 'start' is set to 'addr'.
Remove the second asignment.

Fixes 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified")
---
 mm/vmalloc.c | 1 -
 1 file changed, 1 deletion(-)
mm/vmalloc.c +0 -1
index 5a2b55c8dd9a..68ebbafc9c9b 100644
@@ -171,11 +171,10 @@ void unmap_kernel_range_noflush(unsigned long start, unsigned long size)
 	pgd_t *pgd;
 	unsigned long addr = start;
 	pgtbl_mod_mask mask = 0;
 
 	BUG_ON(addr >= end);
-	start = addr;
 	pgd = pgd_offset_k(addr);
 	do {
 		next = pgd_addr_end(addr, end);
 		if (pgd_bad(*pgd))
 			mask |= PGTBL_PGD_MODIFIED;
Signature · 1 line
2.25.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

'addr' is set to 'start' and then a few lines afterwards 'start' is set to 'addr'.
Remove the second asignment.

Fixes 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified")
---
 mm/vmalloc.c | 1 -
 1 file changed, 1 deletion(-)
mm/vmalloc.c +0 -0
index 5a2b55c8dd9a..68ebbafc9c9b 100644
@@ -171,11 +171,10 @@ void unmap_kernel_range_noflush(unsigned long start, unsigned long size)
 	pgd_t *pgd;

mm/vmalloc.c void unmap_kernel_range_noflush(unsigned long start, unsigned long size) · line 180

Quoted 10 lines
mm/vmalloc.c +0 -1
 	unsigned long addr = start;
 	pgtbl_mod_mask mask = 0;
 
 	BUG_ON(addr >= end);
-	start = addr;
 	pgd = pgd_offset_k(addr);
 	do {
 		next = pgd_addr_end(addr, end);
 		if (pgd_bad(*pgd))
 			mask |= PGTBL_PGD_MODIFIED;
Signature · 3 lines
Thanks,

David / dhildenb