From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754418Ab1IIXjK (ORCPT ); Fri, 9 Sep 2011 19:39:10 -0400 Received: from mail209.messagelabs.com ([216.82.255.3]:17222 "EHLO mail209.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185Ab1IIXjG (ORCPT ); Fri, 9 Sep 2011 19:39:06 -0400 X-Env-Sender: hartleys@visionengravers.com X-Msg-Ref: server-2.tower-209.messagelabs.com!1315611545!16026661!1 X-Originating-IP: [216.166.12.99] X-StarScan-Version: 6.3.6; banners=-,-,- X-VirusChecked: Checked From: H Hartley Sweeten To: Linux Kernel Subject: [PATCH] arch/x86/mm/numa.c: quiet sparse noise when CONFIG_X86_64 is not set Date: Fri, 9 Sep 2011 16:38:48 -0700 User-Agent: KMail/1.9.9 CC: , , , , , , , MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <201109091638.49186.hartleys@visionengravers.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_X86_64 is not set the function __node_distance is not declared in . This results in the following sparse noise. warning: symbol '__node_distance' was not declared. Should it be static? Fix this by putting an #ifdef around the function. Signed-off-by: H Hartley Sweeten Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Tejun Heo Cc: Pekka Enberg Cc: Yinghai Lu Cc: David Rientjes --- diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index fbeaaf4..11c60a7 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -455,6 +455,7 @@ void __init numa_set_distance(int from, int to, int distance) numa_distance[from * numa_distance_cnt + to] = distance; } +#ifdef CONFIG_X86_64 int __node_distance(int from, int to) { if (from >= numa_distance_cnt || to >= numa_distance_cnt) @@ -462,6 +463,7 @@ int __node_distance(int from, int to) return numa_distance[from * numa_distance_cnt + to]; } EXPORT_SYMBOL(__node_distance); +#endif /* * Sanity check to catch more bad NUMA configurations (they are amazingly