diff mbox series

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

Message ID 20191128143524.3223-1-fishland@aliyun.com (mailing list archive)
State New, archived
Headers show
Series mm/vmscan.c: remove unused return value of shrink_node | expand

Commit Message

Liu Song Nov. 28, 2019, 2:35 p.m. UTC
From: Liu Song <liu.song11@zte.com.cn>

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

Signed-off-by: Liu Song <liu.song11@zte.com.cn>
---
 mm/vmscan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

David Hildenbrand Nov. 28, 2019, 3:10 p.m. UTC | #1
On 28.11.19 15:35, Liu Song wrote:
> From: Liu Song <liu.song11@zte.com.cn>
> 
> The return value of shrink_node is not used, so remove
> unnecessary operations.
> 
> Signed-off-by: Liu Song <liu.song11@zte.com.cn>
> ---
>  mm/vmscan.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 44df66a98f2a..fd282d86f4ad 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -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;
>  }
>  
>  /*
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 44df66a98f2a..fd282d86f4ad 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -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;
 }
 
 /*