linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: mateusznosek0@gmail.com
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>, akpm@linux-foundation.org
Subject: [PATCH] mm/vmscan.c: Clean code by removing unnecessary assignment
Date: Sat, 29 Feb 2020 22:40:22 +0100	[thread overview]
Message-ID: <20200229214022.11853-1-mateusznosek0@gmail.com> (raw)

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



             reply	other threads:[~2020-02-29 21:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29 21:40 mateusznosek0 [this message]
2020-03-01  0:11 ` [PATCH] mm/vmscan.c: Clean code by removing unnecessary assignment Matthew Wilcox
2020-03-02 13:54 ` Wei Yang
2020-03-03  8:59 ` David Hildenbrand
2020-03-19 16:59 mateusznosek0
2020-03-19 17:13 ` Michal Hocko
2020-03-20 15:55   ` Johannes Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200229214022.11853-1-mateusznosek0@gmail.com \
    --to=mateusznosek0@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).