Skip to contentSkip to conversation

mm: truncate: remove redundant initialization of new_order

PATCH New Colin Ian King 1 participant 1 message Apr 6, 2023

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

PATCH 1/1 mm: truncate: remove redundant initialization of new_order

Variable new_order is being initialized with a value that is not read, the variable is being re-assigned later. Remove the initialization.

---
 mm/truncate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/truncate.c +1 -1
index 817efd5e94b4..d8dd7ee1654d 100644
@@ -213,7 +213,7 @@ bool truncate_inode_partial_folio(struct folio *folio, loff_t start, loff_t end)
 {
 	loff_t pos = folio_pos(folio);
 	unsigned int offset, length, remaining;
-	unsigned int new_order = folio_order(folio);
+	unsigned int new_order;
 
 	if (pos < start)
 		offset = start - pos;
Signature · 1 line
2.30.2