linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan.c: Clean code by removing unnecessary assignment
@ 2020-03-19 16:59 mateusznosek0
  2020-03-19 17:13 ` Michal Hocko
  0 siblings, 1 reply; 7+ messages in thread
From: mateusznosek0 @ 2020-03-19 16:59 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: Mateusz Nosek, akpm

From: Mateusz Nosek <mateusznosek0@gmail.com>

Previously 0 was assigned to 'sc->skipped_deactivate'. It could happen only
if 'sc->skipped_deactivate' was 0 so the assignment is unnecessary and can
be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
 mm/vmscan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index dca623db51c8..453ff2abcb58 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3093,7 +3093,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
 	if (sc->memcg_low_skipped) {
 		sc->priority = initial_priority;
 		sc->force_deactivate = 0;
-		sc->skipped_deactivate = 0;
 		sc->memcg_low_reclaim = 1;
 		sc->memcg_low_skipped = 0;
 		goto retry;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] mm/vmscan.c: Clean code by removing unnecessary assignment
@ 2020-02-29 21:40 mateusznosek0
  2020-03-01  0:11 ` Matthew Wilcox
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: mateusznosek0 @ 2020-02-29 21:40 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: Mateusz Nosek, akpm

From: Mateusz Nosek <mateusznosek0@gmail.com>

Previously 0 was assigned to variable 'lruvec_size',
but the variable was never read later.
So the assignment can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
 mm/vmscan.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index f14c8c6069a6..a605ff36f126 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2427,10 +2427,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
 		case SCAN_FILE:
 		case SCAN_ANON:
 			/* Scan one type exclusively */
-			if ((scan_balance == SCAN_FILE) != file) {
-				lruvec_size = 0;
+			if ((scan_balance == SCAN_FILE) != file)
 				scan = 0;
-			}
 			break;
 		default:
 			/* Look ma, no brain */
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-20 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 16:59 [PATCH] mm/vmscan.c: Clean code by removing unnecessary assignment mateusznosek0
2020-03-19 17:13 ` Michal Hocko
2020-03-20 15:55   ` Johannes Weiner
  -- strict thread matches above, loose matches on Subject: below --
2020-02-29 21:40 mateusznosek0
2020-03-01  0:11 ` Matthew Wilcox
2020-03-02 13:54 ` Wei Yang
2020-03-03  8:59 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).