Message ID | 20240612071835.157004-7-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 64D16C27C75 for <linux-mm@archiver.kernel.org>; Wed, 12 Jun 2024 07:22:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A337B6B016E; Wed, 12 Jun 2024 03:22:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9BDAB6B0171; Wed, 12 Jun 2024 03:22:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 80DB16B0172; Wed, 12 Jun 2024 03:22:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6015A6B016E for <linux-mm@kvack.org>; Wed, 12 Jun 2024 03:22:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1BEECA01FB for <linux-mm@kvack.org>; Wed, 12 Jun 2024 07:22:42 +0000 (UTC) X-FDA: 82221394164.19.1ECCA20 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf18.hostedemail.com (Postfix) with ESMTP id DCD101C0010 for <linux-mm@kvack.org>; Wed, 12 Jun 2024 07:22:39 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718176960; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UH2rm6YiNrNNYVCZu41szqctz2O14RfFm9t+tz4o6Bk=; b=xKSLL1tQngO7othw1aUYOCDAO+3RSBJ19SOIqYBEaJUV77RNcAvHUhUdUb/4YxcNG/pbqB h4naesPIJ1h71/zWpcMeeZm57aVU1I+mHkHC3tenBAj+gO6AOIbppRE1W404ByYI4p5aEm abm+YnTcrmuf885qP7+UM+l2OZ4qaG0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718176960; a=rsa-sha256; cv=none; b=DZ9k9cUEYhjZj14UxKMu1DHNnsu7tSPsauZgDgTQs2htw2QBdjc6Npg/9X/9KyW84E78oM 5v/YckDuUsHEtvXS3mTKMjE+2H/P5Fyhoxk71qVTJmx2wEIHV0tiallTkEsiGFdAwvKfZC 04dreB7cDCTPWMus717atkVgbPYm8/I= Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4VzcMq6SsNz1JChd; Wed, 12 Jun 2024 15:18:31 +0800 (CST) Received: from canpemm500002.china.huawei.com (unknown [7.192.104.244]) by mail.maildlp.com (Postfix) with ESMTPS id 664BB180AA6; Wed, 12 Jun 2024 15:22:22 +0800 (CST) Received: from huawei.com (10.173.127.72) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 12 Jun 2024 15:22:21 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org>, <tony.luck@intel.com>, <bp@alien8.de> CC: <nao.horiguchi@gmail.com>, <linmiaohe@huawei.com>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linux-edac@vger.kernel.org> Subject: [PATCH v3 06/13] mm/memory-failure: remove confusing initialization to count Date: Wed, 12 Jun 2024 15:18:28 +0800 Message-ID: <20240612071835.157004-7-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20240612071835.157004-1-linmiaohe@huawei.com> References: <20240612071835.157004-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.173.127.72] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-Rspam-User: X-Rspamd-Queue-Id: DCD101C0010 X-Rspamd-Server: rspam01 X-Stat-Signature: mt53p73b9fz5zk6xrm56fbw4tcr54k8i X-HE-Tag: 1718176959-21998 X-HE-Meta: U2FsdGVkX1+MJmodcsRizteHeHP/vo3HXj8AIeGWk4RDM3/nhacdV+AU+9eqZm4j9pUHU/kvVbnDulxybaC62rIcPnBqOjX30NaG5U7ZSUgqCCOm6LPGLqWNCfrk3yztpynrEBknJKO+HOPLI6goxpAIGLUYXRmZaZ1dlEmmIwQb6bLLn5SWHanZhQA6/67u//f3xfaWwKbCA0JnkJ09PIpxWi2kUejKjs0BXSBncbMUF8WYo0p2te080DdjmoLAW+zqEXJSa5YX7bnZnxWeoXNWmPK07gS2XFMNfdoodoJRdLT+W5+wMQWrzqaMSYjOVDNnx/rmlRHgnWrDJUVkA/ssj37B/P40HoOdYsEjwuoJ2gH/Wm7m1JWKDt2MsJUx20LVFtMFnObzwR74yMSOyrNmWBKM1a1AQZmb2fKDdGKImq3gU7yhiJm795ekWEXFzlnZGoD9KKbjKkG9l/pC8N6109uk6gWeI0lDCCIsVYpIWa97iXxSvOWCaQG0oC8CrN6CNhjwzgg6nHHlr08xhkBc8M70N7xEUWjmp6j3kc8TU6YQgAjyJkDN/9PJt5ClUGcu6BL/i9izZv8rMP8uWI0Ph7Ifww3xdZ+DmSimqqf4cEZRNQnZ0E7k0eixfQ12mmeVaIurbh4KEPu0St/rB0cur9eEg0S226kqBNmBiZ/3u8QT5GDPDwMa4czxZoFsjiv4GrhVB44SbnkZGRn5bSU3/1LS8U+zuRfE8CRgf8z14FYiyGYkktTJQwqsD0E1Af1MULM+veE3DwwZ+SpP5mDyc3tqraFW0C9smQDOwZr7i+NsDWpIpTSDchqEfIzlmP/iexgQa50IF/uOH+i0EYterLFVrtve/tMKNo3fTIYKfHZKAsc3b33fG6oTYo77gyDoxwB0eK8hWjh35ZUHR9ouhHVOfy9YYO81l8fO6EYWzoHhMM9c54ZSaYm4D0hnBZ+5oPpfGhaPbPFpmfE BZc8BRnz YXa9UMvP/oa4qYMa1EO2iAmik50g3u3t9AJP0nTEGUbNEsEVzJjD0JZHpNQzZAdbnEAd59nztLI2HBw6BxaDWj6jcRi8Uew8sI4OD5T549lsa9NRx/vEai2/dCT+1q8tjPyZSU8d3+xMln4Mf7XiGHCHGjEJksxBAjKlwbB5NrWjvLDfAgaweCNzuUPJImzoMldctMA+zSAZFGKEhGutjFzKtpQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Some cleanups for memory-failure
|
expand
|
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ec482524158e..339752d768d8 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -2542,7 +2542,7 @@ int unpoison_memory(unsigned long pfn) struct folio *folio; struct page *p; int ret = -EBUSY, ghp; - unsigned long count = 1; + unsigned long count; bool huge = false; static DEFINE_RATELIMIT_STATE(unpoison_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);
It's meaningless and confusing to init local variable count to 1. Remove it. No functional change intended. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)