Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6890774rdb; Tue, 2 Jan 2024 18:23:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjkzCrv1ldfieg48xt2kJPF6kosrRIXyO1GmMViUifNq4jPbwAvi/q+fMXX1r+BYDRPEye X-Received: by 2002:ac2:5b03:0:b0:50e:6168:c99d with SMTP id v3-20020ac25b03000000b0050e6168c99dmr7673956lfn.27.1704248584388; Tue, 02 Jan 2024 18:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704248584; cv=none; d=google.com; s=arc-20160816; b=DzIpajQPOGaoQClw3CPXCi10hCJ4jUy9Og+9Ii+MvNVhjjnl9SIH5LOMoQuwEOCmup LnoJGDbHyxHW1XlXpG+gQqLTidPkrsWYjas3D7aKCmGTpdXuZcyFiYYufSAsfC2/rxa6 oUCiOZR5SaDlVuO/flNGo28fJahv33+7tqIggRkme+Uk9Kajxwdc3GguUnzemd17gCvA GIgXuk1zlUdFMLejfUkw9EGi/GgR89jNqn0WI55MZDSgvHC6dCDhY01IvzXouM2+1UvG eLOQG8i8IxW+I0TiD3Kl6+fnzYrUnVmrwFxz48KraptguEg32GkWYdFnFXnjKbnU1lkY zTQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=zW0ynOCiWkqnAZ1LOZJ8b5gEX+aiqOQ8TMoqLnbStxU=; fh=B1BIZJ2krpJtpc6kx4wkSTe6JLf0d6btzTgaSOOmxKA=; b=y/Els0C9VQJmDQdkP+sNigF1BE66y5D4+sVCtxoWXEvD69bloMRceWv6gip7uR6t/3 IDSlgU27DBenMAGYZRIgD58cmuCOV1ri5mRfEp+jSepN/IJshbTk30lS5SYTA9Bpy2PD iH9JXQ5zvsZdmnvlCw10I7l9jWUum7jJP9J3uc0LDnccSwxelRzzU0jGgeh/2l6EO/3M 0N0ftawELvClyocRYqkpu2P6sF/BueQb8q0r/BDgI/FeCXZdUgeEHW6+iCGlPYl1bB9f erSI3tfHmtlMFNXjkGGiJ+nluiVAQ65TT+HwV1CPvgekRpdbIjvjaMuqaAcNUSYjbVyR 8A4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lNPDRige; spf=pass (google.com: domain of linux-kernel+bounces-15070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s7-20020a05640217c700b0055650783ac6si2218311edy.277.2024.01.02.18.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 18:23:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lNPDRige; spf=pass (google.com: domain of linux-kernel+bounces-15070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 249C31F221F0 for ; Wed, 3 Jan 2024 02:23:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57CAA17981; Wed, 3 Jan 2024 02:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lNPDRige" X-Original-To: linux-kernel@vger.kernel.org Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3931171C4 for ; Wed, 3 Jan 2024 02:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <958bf051-e776-4cbf-ae3c-76ee82d55bcc@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1704248570; h=from:from: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=zW0ynOCiWkqnAZ1LOZJ8b5gEX+aiqOQ8TMoqLnbStxU=; b=lNPDRigemVrcHRahrMfRuzKZcN7ZC/aiSMeb3lX894JA808MTBR3dEX2UTrJy1J0ABLOhn e4L/lhw4axnySR6p0F7vbjmY/qX5OG5dpVndfGIVB+lJNsyM+DUyNY0pbMtoioNatl6Jh9 s3h4aGcE1i5zrmS7G2bDbo3UsWf9TfI= Date: Wed, 3 Jan 2024 10:22:46 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 4/7] hugetlb: pass *next_nid_to_alloc directly to for_each_node_mask_to_alloc Content-Language: en-US To: David Rientjes Cc: David Hildenbrand , Mike Kravetz , Muchun Song , Andrew Morton , Tim Chen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ligang.bdlg@bytedance.com References: <20240102131249.76622-1-gang.li@linux.dev> <20240102131249.76622-5-gang.li@linux.dev> <19b08bb8-1fbd-557b-2684-5c29c5c783e6@google.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Gang Li In-Reply-To: <19b08bb8-1fbd-557b-2684-5c29c5c783e6@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2024/1/3 09:32, David Rientjes wrote: > Same error as v2: > > mm/hugetlb.c:3315:53: warning: variable 'node' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] > for_each_node_mask_to_alloc(&h->next_nid_to_alloc, nr_nodes, node, &node_states[N_MEMORY]) { > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > mm/hugetlb.c:1501:3: note: expanded from macro 'for_each_node_mask_to_alloc' > nr_nodes > 0 && \ > ^~~~~~~~~~~~ > mm/hugetlb.c:3342:38: note: uninitialized use occurs here > list_add(&m->list, &huge_boot_pages[node]); > ^~~~ > mm/hugetlb.c:3315:53: note: remove the '&&' if its condition is always true > for_each_node_mask_to_alloc(&h->next_nid_to_alloc, nr_nodes, node, &node_states[N_MEMORY]) { > ^ > mm/hugetlb.c:3310:7: warning: variable 'node' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] > if (!m) > ^~ > mm/hugetlb.c:3342:38: note: uninitialized use occurs here > list_add(&m->list, &huge_boot_pages[node]); > ^~~~ > mm/hugetlb.c:3310:3: note: remove the 'if' if its condition is always true > if (!m) > ^~~~~~~ > mm/hugetlb.c:3304:20: note: initialize the variable 'node' to silence this warning > int nr_nodes, node; > ^ > = 0 > 2 warnings generated. > How did you get those warnings? I got nothing in my compilation.