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: 189996 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2459363dyb; Mon, 22 Jan 2024 01:30:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFMYwT4N++sDn2pVk6jvpAc6zdeADt21wYDQ07ENhqoliecpDowxrAXmBujPjz/dOVm1Fm X-Received: by 2002:a05:6871:88f:b0:210:c64a:a39b with SMTP id r15-20020a056871088f00b00210c64aa39bmr3546610oaq.43.1705915826690; Mon, 22 Jan 2024 01:30:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705915826; cv=pass; d=google.com; s=arc-20160816; b=0cvfKMpJa0s58mntW4nCTeeElMnuM3picY0z2ZLCTfNZgzrJRJN1WAT5MqBdtVIOvw YsqPSUQETkxJIM5aFIGkWf2dLaW9XO/9rvyHUODqa7PQo1onrgJKgbQni1Be0YpKrXOz yqb+r4iJ50YmxLDJWvFvxiUCvpdn7p1xj87vq6sRZ9dfk5VdpP+c8MOCBAzuvjZ3E5zQ rFBzfyi1oviWAVOpDcw3lpyn4tEGQP7k3YTE8t+QJUkQzVs6GtYMWQAD9R+L9QMwaRmE qCxg5smq9N9HjEHLEFFPxcKE6+lK2PNk9tQJQ8VLbP3pYjw02L0puKNRh66NMS3Bs6Nd KPSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=MA56Trfdmas0N9KP+Qetqk6xxYzVaJwZcqc7VsxjPD4=; fh=vdjtPhtB2o393IX0+oaWpNO8wSdIS/xUJLpZNmI0iWA=; b=NvBzWvUiv1nvbfZAfHeN5Oxg+FwkeykaYm4e8Ri/H5XAKqv8gyRF7ZfDc83Z0CFNEl xBCx38yzE9PUpKGPbThI9q/Iazb6Q7U9FsjmBzzavPwbFqfBubRBqmKfd+bRcO54Ojj0 4Halrw9JBcs4EwzI5uF/ORlh/L5/dLGv5HUvOPv7hDnpoXnY6txtcGTDKc19cpERyYyW 6+yIlwy0LQtdtqrifsulam/yPCnftdoVPk0DGjXjbVZwtoSflDTq7/hagWhormivvw5W EQE2IEYKV+zt56r1uI6v6uDO3Pj7AXCaVMt57lzLIPrWbNaWDthAcutYxu9/YAjBhvii 5iYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=c7kE113v; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32632-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32632-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w17-20020a63fb51000000b005cf588da70fsi7518141pgj.643.2024.01.22.01.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 01:30:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32632-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=c7kE113v; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-32632-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32632-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 608D8289311 for ; Mon, 22 Jan 2024 09:28:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA57539FCF; Mon, 22 Jan 2024 09:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c7kE113v" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4B163A8E0; Mon, 22 Jan 2024 09:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705915635; cv=none; b=WDUB+d7h+9w1O+V+Omu2M3aB4FzQDF/oOSnTXK/9xO2lzIKO8zYut4E3vnwW6BczGFGweIhJeM6IOBE59UL+reyWkNujgbhjxt1+6ITUDo11OU9riHkrZNXIfLlSyslB3meEnyAp8m32J6cZVfN5ktVjXnTR0yf/sFEhJGTUpOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705915635; c=relaxed/simple; bh=c+pp3wM05kjEh1TGNSe7FIK8DIIwbLO/SK+P7CGfYCk=; h=From:To:Cc:Subject:Date:Message-Id; b=kpjl0Ua4m2wf7YjIiEPtKCqblcLIki4QtX4eeKo2XZoN1vAO9tjiwxyhM6XqrYxVrLNFl+NyVJNGUv8acNt+rLZqs434Z8CvuGGJl1KkEapkPqzAX4WxIGbtfycKzBj+C22IgiXSbuZOXeWw37q1g0mUuvFn3DfngeNeK3UPtEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c7kE113v; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a308e6824ccso4684566b.0; 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=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MA56Trfdmas0N9KP+Qetqk6xxYzVaJwZcqc7VsxjPD4=; b=c7kE113vjydtZiVWpBo5miYdkwIQduwj4wz5rUKiAKvpxQtx99bawx8kx+2Z/fUGc6 6v8FskV7aV7qFUdFNDe8iq3tD2fKSHZr6FA//BFgQtZkCTga6mLyuOK6z/qE8bZ+gqeA 6+USIXNTnZIfEUkdDcwWqAeMke7IRNu47vhT0MO+WwPgeW+wZED6PA4gv3tPn9UuCEQt 33hmWo5LVxK/AcrJWa8tdzI+LGIbm+OJkQEo1/nrxP8041U33eEtFIG5I/28ymMlmkyp w3OaSOq3gC/++umNpEcujin+H3expe7vSJoL24by9+VL/kG0Sd5C3SLL/HxdSx5K+93O Mg0g== 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=WPmqZNLjVqu+PC/Dqjsk1G8Ub4WtWsEAPDFjyL1Fg1CeYQy9Y+/do9gHCrMIixrkFG L0/5mFQPCYbqVT312xqehgOqIea8eacmJh+jnKnZmwBmMg5a/r5X+SbqbpKCZNXEMTbJ UrjV/6jbv4i425qK0MYri295RNsCtsuv4eHVDNlCWKbtP5FBXjd5W+IJHdjDoCBEY7SZ m+WdpRaru1/RB3znnF02apJTXgFw6v4Z1TkkdqkK5yeWxe+Fg4D/hPxbT+dKufi/aNfs LdAF/yGJUemzysC5SDbCUkdeYQZlljowIGr9daE3n0lwskS74t3dovMuRvjM7NePFyWn X+IA== X-Gm-Message-State: AOJu0YwQY9CP30367N+W3HEk+Eshn1+5t0r1aogdORRO6xW25sRHT3yJ 6mlwftr8nXnH0mxR/k29qauRDjAD7e+5PRn1ttHLGKKroHS6FyiY 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788782393553640329 X-GMAIL-MSGID: 1788782393553640329 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.