From patchwork Fri Apr 21 21:47:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 85710 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp85501vqo; Wed, 19 Apr 2023 22:18:01 -0700 (PDT) X-Google-Smtp-Source: AKy350b/gdBwyJdvBPW4XfmW7ksDXd2JymtgJI5Rqd/uTJoXF5VLm0ZhbvM+3Gq9p5E4fQi23v4e X-Received: by 2002:a17:90b:4f87:b0:246:9374:febb with SMTP id qe7-20020a17090b4f8700b002469374febbmr522759pjb.19.1681967881327; Wed, 19 Apr 2023 22:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681967881; cv=none; d=google.com; s=arc-20160816; b=emf+p4/Gouk9M0VzjCO1rG6gdUzXyIqEaAqVxG026DQer2nfYBE+WaeWpx+7yV1M6+ M9HA4ldVZ9xHVfWzP2l5aRpXCMt5aN9DK8lZ+lpueOSczYd1xsiPV9HmHvG1gH7TSpEN UGTNswjXqwldFUMwba4kcZpPRQ4FPSvSrVbIy5oKh4/KnHayUCpwD0ITrvGu6En3XNMN wmJKsJpuh22V3M4QNCjKjpf4MamcO1VdU/WzflZOFE97gxI+5kM3aOZAri1zMYIhkuHp V+7qvQJIsup+aMZKu+AEc3Rzptvec7AfSUK7lpoz8yqTDRkVSJwAuW9MhcJgfyaCuVe3 7x4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qdyMLvLwcsxUElDxAAH8KHoyXA9Ontqc87TTVLywS7E=; b=StWOAD+qZW79w+lpSQyj+FucIi/wdMZwz/d0zms+C5Nj6yWImqsrFthNfDe8F7tOCz deNRHFh/pEplwBcgEW0NihnAp8lzpohKEisHaN77515X0QLWSg4dqZUfF8+BVoo3jCon 7zPfK3FgW1DKyZm6vSA0zRoeDJQBDYyJPWXXmdN/cZ4B6jjjJf3QLZJqAZ03on7sOEUm RQ+IIwiX6Q4C96IOqn59V9RH+Jb5ZfscT01o68dTnMOttvJGRAY3CLL1PIRvBtQgXydD 72c0cE+lhH4bgS4m76oPQFc9lxXP2WJ24GlGGJH+T9y2zXW0HXNGhBmsCWKSHoJZjPUK Ydig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i12-20020a17090a974c00b0024769a264fcsi3488126pjw.10.2023.04.19.22.17.49; Wed, 19 Apr 2023 22:18:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbjDTFQ3 (ORCPT + 99 others); Thu, 20 Apr 2023 01:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjDTFQ2 (ORCPT ); Thu, 20 Apr 2023 01:16:28 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id EDE744234 for ; Wed, 19 Apr 2023 22:16:26 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 8EA8A180137A6E; Thu, 20 Apr 2023 13:16:16 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?mm=3A_sparse=3A_remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_rc?= Date: Sat, 22 Apr 2023 05:47:33 +0800 Message-Id: <20230421214733.2909-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763671153024318551?= X-GMAIL-MSGID: =?utf-8?q?1763671153024318551?= rc is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/sparse.c b/mm/sparse.c index fb7aeb1899a4..c2afdb26039e 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -832,7 +832,7 @@ static struct page * __meminit section_activate(int nid, unsigned long pfn, struct mem_section *ms = __pfn_to_section(pfn); struct mem_section_usage *usage = NULL; struct page *memmap; - int rc = 0; + int rc; if (!ms->usage) { usage = kzalloc(mem_section_usage_size(), GFP_KERNEL);