From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 31566332918 for ; Thu, 25 Jun 2026 02:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782354464; cv=none; b=N4RXjFkBTOqJDT+d5iVzMhToTvMbbIXYti+oEdt42mLq9RHzkArT6KYDqCUkfxZsSOV0mMJi+XrG+1zCeMWuZVbcmC5Y37QRpQ08xWZ9momKPlbnTM4oMSVg7sjgfrHf1tow4tQH1PWCUpEQBO61LB9UtYjZ63gQ9cyIVJQdOzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782354464; c=relaxed/simple; bh=/uGROgJKiKRjic3Ujqeu8Md4SqjCaelCdabTiiTgwC4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=sSylpqFteaLXmfVgNd/K3HTZ1BRfXtWWZkXxcLdqi1GpDKabvsvMPruWenaxb2bTaicGYK7sFySmHt7ujC0PQw+BCqy//7geI2aku3KaKwjKT6DAXOP+vz7DiiW0GIUPwOM1zFoOFjqDFRsCxPJxalzM47IrkEfuQc7VzvMZfGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=DbzrAQBi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="DbzrAQBi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 762411F000E9; Thu, 25 Jun 2026 02:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1782354462; bh=opuTRvHJwaMNifPV0It90Ejzc8af5zHdKuBMA/ZMsoE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=DbzrAQBixeyDdXZYzGJi2O4PFVgloKcZNe3AxZgtI1AlqusQDsZjXlyllY+m17gEa +diFjtgj1hRifJ200up8bY4aCfJGEFXqLWQutj6eetE6r4NV55VWHWxLyoM1KkUuLn 7xehB0AMefpHwMCl2mT0hDtoXveESjv/rxkyr4ms= Date: Wed, 24 Jun 2026 19:27:42 -0700 From: Andrew Morton To: Ben Dooks Cc: Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: don't build vm_numa_stat_key if CONFIG_NUMA=n Message-Id: <20260624192742.afbd255b97d82ecfe7e11e17@linux-foundation.org> In-Reply-To: <20260618100614.1321950-1-ben.dooks@codethink.co.uk> References: <20260618100614.1321950-1-ben.dooks@codethink.co.uk> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 18 Jun 2026 11:06:14 +0100 Ben Dooks wrote: > The vm_numa_stat_key is only exported if CONFIG_NUMA is set, > so avoid the following warning by guarding it in an #ifdef > on CONFIG_NUMA: > > mm/page_alloc.c:165:1: warning: symbol 'vm_numa_stat_key' was not declared. Should it be static? > > ... > > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -162,7 +162,9 @@ DEFINE_PER_CPU(int, numa_node); > EXPORT_PER_CPU_SYMBOL(numa_node); > #endif > > +#ifdef CONFIG_NUMA > DEFINE_STATIC_KEY_TRUE(vm_numa_stat_key); > +#endif > > #ifdef CONFIG_HAVE_MEMORYLESS_NODES > /* It might be tidier to move this into mm/vmstat.c, around line 38?