Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp279816rwr; Wed, 19 Apr 2023 22:18:30 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7/A2I2cmCXhBtEHNndh2Ss+TOlQAVU78G9HziBoI9wG+dHFdypiGFf7guOoS/3lYoXQaY X-Received: by 2002:a17:902:f80e:b0:1a1:d366:b085 with SMTP id ix14-20020a170902f80e00b001a1d366b085mr310167plb.21.1681967910047; Wed, 19 Apr 2023 22:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681967910; cv=none; d=google.com; s=arc-20160816; b=jbrVX+yjm5eCrIbYTsqRGId12L2vc14wNZV7uuIuhownyXThlqqmNG9hzwR6T7zTB2 Z+uVwXWY8K9oNhoqNwdbk4c7P1hg/1gqWY4HaRD9Zqa7kG2F7+R4CVUa8uCrzm0l+Q0l B8ClYghJRLEVwGWrkPpooVcTdwISYRarV14wS7jsxG3YkII14+Cwtf27Jft55S2hYM3q Dl42+TWYMDiGXxjs2iBJZhpFF3jReSUx7ynNNpYjbm7hCGqw90xAOT73LHRZ2o383iVL 6UfUFhUoecTzZQugniMOqA3zW01qEiwzuwfe+FhChFh/7QrViwtU289DG+yfdVKtu9NL ymrg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170902f14d00b0019d13e26ecasi730727plb.355.2023.04.19.22.18.17; Wed, 19 Apr 2023 22:18:30 -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 S229812AbjDTFQ3 (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:=20sparse:=20remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values=20from=20rc?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.18.2