Skip to contentSkip to conversation

mm/vmscan.c: remove unused return value of shrink_node

PATCH Applied Liu Song 2 participants 2 messages Nov 28, 2019

Subsystems (3)
lore
Share & tools
lore

Liu Song

author
#0 lore raw

PATCH 1/1 mm/vmscan.c: remove unused return value of shrink_node

From: Liu Song <[email protected]>

The return value of shrink_node is not used, so remove unnecessary operations.

---
 mm/vmscan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/vmscan.c +1 -3
index 44df66a98f2a..fd282d86f4ad 100644
@@ -2652,7 +2652,7 @@ static bool pgdat_memcg_congested(pg_data_t *pgdat, struct mem_cgroup *memcg)
 		(memcg && memcg_congested(pgdat, memcg));
 }
 
-static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
+static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 {
 	struct reclaim_state *reclaim_state = current->reclaim_state;
 	unsigned long nr_reclaimed, nr_scanned;
@@ -2818,8 +2818,6 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 	 */
 	if (reclaimable)
 		pgdat->kswapd_failures = 0;
-
-	return reclaimable;
 }
 
 /*
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Liu Song

From: Liu Song <[email protected]>

The return value of shrink_node is not used, so remove unnecessary operations.

---
 mm/vmscan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/vmscan.c +1 -1
index 44df66a98f2a..fd282d86f4ad 100644
@@ -2652,7 +2652,7 @@ static bool pgdat_memcg_congested(pg_data_t *pgdat, struct mem_cgroup *memcg)
 		(memcg && memcg_congested(pgdat, memcg));
 }
 
-static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
+static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 {
 	struct reclaim_state *reclaim_state = current->reclaim_state;
 	unsigned long nr_reclaimed, nr_scanned;

mm/vmscan.c static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc) · line 2823

Quoted 8 lines
mm/vmscan.c +0 -2
@@ -2818,8 +2818,6 @@ static bool shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 	 */
 	if (reclaimable)
 		pgdat->kswapd_failures = 0;
-
-	return reclaimable;
 }
 
 /*
Signature · 3 lines
Thanks,

David / dhildenb