Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1297357iol; Sun, 12 Jun 2022 11:42:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDVdV8ekN/l36/R5tdHb2dph9v1AfHXFASomg4EpQWw1CbgCS+NLw7Rc9b6g0O6dyFJZi4 X-Received: by 2002:aa7:d4c9:0:b0:42d:cbf0:bfb1 with SMTP id t9-20020aa7d4c9000000b0042dcbf0bfb1mr62072792edr.278.1655059337340; Sun, 12 Jun 2022 11:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655059337; cv=none; d=google.com; s=arc-20160816; b=wnrd3FLPPX6HDy6mKTFa0EIk+z0OnGR6QWrCfyS+dtYYd0Ak85J1+lYbi3ZP0iZU24 elSe62eJX9uMookT2ipQhYqC8q1wcOKhflMx3PQ/bW1JHqtsY2auDltCzqqRXD0uWeHK eWIEgG8ghtKrNEHJ4WX4P7FFe2YO/1atk1CLtCsCCcRLdulpZoldmTdFXGSwbliK3oeU mnLnU+d/Ip/vCnns7cyPxs5f/z+DfdlK6PBHZaK0RrEoYniSDdaf+n6aa/itqsBvyhEk fyg7XgCcmPrdPrswYS72cBfVyVA0UdyPleoNNo/GLli8EfTfUsMjptADH0SawbKQSapC FwjA== 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:dkim-signature; bh=cNqVSGRpc6PfKoYS4rbiG4/6+kXDZAGCvWAhlJaU3Kw=; b=GVuVhEOPJc2WaAxQGzANLuvIu41k6oFIYE5kMy/jb70dP+fXvBjGJBCItpguzDoMJ6 E1agoGt3L2AqJHIgUBQSJpIDgTpUq9Ga+2TtP5s75iSdnIm2Y2C/Y94kOUlKtsilK9rK 15oBORNYe8W1l0acc61tlkyppiQ72R2sIaN1CbAXI6aS2PoKF1WRqhabWwIVB67rnD4C y5/pP4dSZCKOSM/DvnyG2A3WMSL0WeDc2WKs1AVarw5KJY0WnPXUWZpkYIoPOZSQgBDe unwOfFncFQfWNxnz2lANl19elMBpiClzuBXsasGNdr5t3uvSGswcjvhQ2Ow5id43kMgs Ep0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YMFisgdN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga20-20020a1709070c1400b00711d8a5cb36si5595671ejc.912.2022.06.12.11.41.52; Sun, 12 Jun 2022 11:42:17 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YMFisgdN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232875AbiFLSXi (ORCPT + 99 others); Sun, 12 Jun 2022 14:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbiFLSX3 (ORCPT ); Sun, 12 Jun 2022 14:23:29 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDE6B4093F for ; Sun, 12 Jun 2022 11:23:26 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id hv24-20020a17090ae41800b001e33eebdb5dso6878496pjb.0 for ; Sun, 12 Jun 2022 11:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cNqVSGRpc6PfKoYS4rbiG4/6+kXDZAGCvWAhlJaU3Kw=; b=YMFisgdNLzZga7LeDHFsel0PBi2qjOzYKpzMdIhTq1aOANcikyWVofLJI2f9AMEjYc QPzj0+GPyGglElaRrF58vA3MILwmMHDRsXdEImkHYIeAwLw6ISjESX9EQA5QqogqOXai 78Q6Gy0wPTO2Py5eLl0/KQcan4I3LlA1ZWr2CHqkY+S5c0gTqJMYZvNFNjezysU22r0e icyxWOq8gmkgoX4deafYBXV3o+VkADl5HyqNVjN5YB7fNp+mxrSijy2MXjTvvOUxCQp2 dP8hQB6TwnHUXQn2AjKvKotwratXUDuaMlDFDaXu5wR7pprIhTLhi42fhkTmLbAtsc7B pzXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cNqVSGRpc6PfKoYS4rbiG4/6+kXDZAGCvWAhlJaU3Kw=; b=6/xvscLmsTszo5Acw8Qy0dYTyPSUTR/FX2uxmYEPfSmZvOVcrDWSz0zqz+aMkEncHR oFZv+0a8gTchJRg12f45vrfROg68LhNZtz5YwSScN/+S4QsI45kGGI0NHFuOM2tSUvFx 7m+PnOGlDlmS+qrl7KNW7xtAJdAHUbHcymyaMFNZUDpGCDCH8mC8k9d1I9KDRIMEbvGi TCbSdegwNqz+F3+KI8Kj0BNy6/954C2h1AXfljvKznEPQS/IfakZSqp4SZ1hzVkYTSrA ChKga9fKim2dfgooShS+L/H1/3LRXFdQ11Yiwq/hVMkWxByFYYHBK7vxPIm7Y5Gwk90T I5qA== X-Gm-Message-State: AOAM530n7COWjKXgY1y00JD6uUjnYeae6rshInHZknEF8adrL3YuZ7Od IQLEX05vhneSC4TTQbm6ksw/EAM6utOkbWgJ X-Received: by 2002:a17:90b:3b45:b0:1e8:8688:219d with SMTP id ot5-20020a17090b3b4500b001e88688219dmr11329466pjb.231.1655058206407; Sun, 12 Jun 2022 11:23:26 -0700 (PDT) Received: from ubuntu.localdomain ([103.230.148.189]) by smtp.gmail.com with ESMTPSA id e17-20020a637451000000b003fb0354c43asm3666322pgn.32.2022.06.12.11.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 11:23:26 -0700 (PDT) From: Gautam Menghani To: akpm@linux-foundation.org Cc: Gautam Menghani , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: Remove unwanted initialization in vmemmap_populate_compound_pages() Date: Sun, 12 Jun 2022 11:23:20 -0700 Message-Id: <20220612182320.160651-1-gautammenghani201@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Remove unwanted initialization for the variable 'next'. This fixes the clang scan warning: Value stored to 'next' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Gautam Menghani --- mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index f4fa61dbbee3..3008aa7859e0 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -737,7 +737,7 @@ static int __meminit vmemmap_populate_compound_pages(unsigned long start_pfn, size = min(end - start, pgmap_vmemmap_nr(pgmap) * sizeof(struct page)); for (addr = start; addr < end; addr += size) { - unsigned long next = addr, last = addr + size; + unsigned long next, last = addr + size; /* Populate the head page vmemmap page */ pte = vmemmap_populate_address(addr, node, NULL, NULL); -- 2.25.1