From patchwork Mon Jan 22 09:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 13525017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B245C47DAF for ; Mon, 22 Jan 2024 09:27:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C84A6B007E; Mon, 22 Jan 2024 04:27:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 977646B0081; Mon, 22 Jan 2024 04:27:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 83F176B0082; Mon, 22 Jan 2024 04:27:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 73F6C6B007E for ; Mon, 22 Jan 2024 04:27:15 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3B5581403C7 for ; Mon, 22 Jan 2024 09:27:15 +0000 (UTC) X-FDA: 81706418430.06.F4AF52F Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by imf21.hostedemail.com (Postfix) with ESMTP id 8C1151C000F for ; Mon, 22 Jan 2024 09:27:13 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="D6Zo/S8b"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf21.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.41 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705915633; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=MA56Trfdmas0N9KP+Qetqk6xxYzVaJwZcqc7VsxjPD4=; b=I++gQyF7WWOW9iFz1caqoRBH6upgrw3KMAjf5Va854AJIi5GMjh056eHBp3WCGk4KR98D0 oS91j9ima723bTdRVhWFYRfnVwGL0ASmkR/hpbnBjNsvp2Ir3fpCWtd9M+4p4JIhActUo7 3DuqXGWTX3yO+rO+wEfcQ//Rq0ZdJg8= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="D6Zo/S8b"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf21.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.41 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705915633; a=rsa-sha256; cv=none; b=aUj9pTEzPSJ3EwUe9sWT438sTRNbBso3xt29bI+IXHiwCU3p0vzOxO/PjmndxZIqiq91f4 mZd3YHC76+U3h8ilpJUDqqHtOjRbv7Vc9VWCYlQGvVu+PB2r0Frq7zKhuMXemWDYLXwC39 w2tiFy+62aEfbANKpLU4qMCDt6Ry+ao= Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a2dc7827a97so306805866b.2 for ; Mon, 22 Jan 2024 01:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705915632; x=1706520432; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MA56Trfdmas0N9KP+Qetqk6xxYzVaJwZcqc7VsxjPD4=; b=D6Zo/S8bJdh8FooTi/mb7F2tkbnMb7ryrLdYlfhxgVI8evknvJ3pZ+9Nw+8N3WTSOS kTMNbjG5T4RAnXlCNL4Bwbj7K1sda1aTO1TebVaJsf441mr7hQkqOnWU5v9CNhyN4UxX QCDgDzkpNsJHBOnwaqpGvehSj+3GpDzQ5xtwb/BsJge00F+f9zpRRVdJ8CXKUq1AEZYN 6VNqVE2200dDV0jIkivHVdvyXOzh3AGHeWvwe8LEra698pPJhQqk8RTpXw9OCfko1gfc mtgebE2chPnvRWxo+ZhWhYJXW809YxzdR5JFp0Izg6Due+CJfQQkkbQb616k6VrUkotg BcmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705915632; x=1706520432; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MA56Trfdmas0N9KP+Qetqk6xxYzVaJwZcqc7VsxjPD4=; b=lnRUMUfvgXBBJBhdaBtero5Y+ebStxR4pQQkDGBH1hMvbk8WH1yP0cn7unjUQ2hVNT uaEDzmpIzT9SXOEbnAAiOsngLIXIRH5kifpwih7Qe1uLY9dorKjZYCjwt1qUcksnp6pe xEahCWUXwoWfgw4497eORwI6FDPB0sh9oyMA67ztkycOLs9l0MV1cE7iq57yEmhI588K jTYiDmb850rjd6SxBkx1H1XKmXWeywjCbYfHRsgGb4EF3LVK3OWg7sVFXKityGdKp9+p 05XAjcuQ4uP7gfeMv/Z26ffBawRonPAl3TX+NqmjQccFEpZ2FJeG6Q2JLllwZC+AuiQp EGaA== X-Gm-Message-State: AOJu0Yw0QcMi3LkI0TsZ+FKtIbbfz9/zu/T4OZxcFj2W5Nv39OvpffnR vNCrVsxBSEDa0JlQuR0ReBUqsN4VV3xs/KgKhTabWEoflKe5Cf+V X-Google-Smtp-Source: AGHT+IESyAopfrZSpMlLQkQBCVGtEcQY2zrHFpASJJPNAHvpg3w9AW6i0xBMHApfSFn25rSKO9LHNg== X-Received: by 2002:a17:907:982:b0:a2f:17c1:2abb with SMTP id bf2-20020a170907098200b00a2f17c12abbmr2426003ejc.60.1705915631745; Mon, 22 Jan 2024 01:27:11 -0800 (PST) Received: from felia.fritz.box (ipb2191d3b.dynamic.kabel-deutschland.de. [178.25.29.59]) by smtp.gmail.com with ESMTPSA id i16-20020a1709061cd000b00a28825e0a2bsm13114843ejh.22.2024.01.22.01.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 01:27:10 -0800 (PST) From: Lukas Bulwahn To: Andrew Morton , Hugh Dickins , linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] mempolicy: clean up minor dead code in queue_pages_test_walk() Date: Mon, 22 Jan 2024 10:25:04 +0100 Message-Id: <20240122092504.18377-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 X-Rspam-User: X-Stat-Signature: s3j8xw8uif1jdsiim68dw59aedbkbfbo X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8C1151C000F X-HE-Tag: 1705915633-104594 X-HE-Meta: U2FsdGVkX1+DRJUMvlkoLtu1vq707hW0j18+XeBqPAIlSQ3ATRhRbqMb2Tj0OuFaZOpYWq89Mle3JrASLaXhbZhYCTnul1AR+bCiq84BAt0PQzL22V1Me8PBGoYT3qmePywFsn/FUGdICRrudiiXw4FQD3RBNc/RoaTsoFLpc3KwxL7bpM2HWD37NcDKZo9nb3HEytn3PKeTctt1scMSvlv9xK/WmASbKP+fIwN0fKOxFK6B21OClvT89jZfUWmPaHiFHl0dgiZXDvvvjE5F5CowP5C0l9BwOqlEg8OXBME/qPtmKo4DgkODR+Myc4DfH7wqJXscPUjSUzae4y8XKEw03/jE55vTpw48RhCW/ZD5Yoxl8Mi0gqMkNyHljjuzRmaywZyB6NW5qI63gmV8ja8TyhTQ/rM+s2Uyz44NeNvMfwuTt2TB9WUqGpKsYdklPBVcU28xZ7VUArHTkSXJbNVIowZjzZpHW6X7kL3mHwbC6ysh680fxw2HCBhdt4eb4vkxFBKfzkx1k9cL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ner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 2cafb582173f ("mempolicy: remove confusing MPOL_MF_LAZY dead code") removes MPOL_MF_LAZY handling in queue_pages_test_walk(), and with that, there is no effective use of the local variable endvma in that function remaining. Remove the local variable endvma and its dead code. No functional change. This issue was identified with clang-analyzer's dead stores analysis. Signed-off-by: Lukas Bulwahn --- mm/mempolicy.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index a2b5d64b28e0..31deff75de43 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -690,7 +690,6 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end, { struct vm_area_struct *next, *vma = walk->vma; struct queue_pages *qp = walk->private; - unsigned long endvma = vma->vm_end; unsigned long flags = qp->flags; /* range check first */ @@ -718,9 +717,6 @@ static int queue_pages_test_walk(unsigned long start, unsigned long end, !(flags & MPOL_MF_STRICT)) return 1; - if (endvma > end) - endvma = end; - /* * Check page nodes, and queue pages to move, in the current vma. * But if no moving, and no strict checking, the scan can be skipped.