Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761486AbZCRWA6 (ORCPT ); Wed, 18 Mar 2009 18:00:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761354AbZCRWAI (ORCPT ); Wed, 18 Mar 2009 18:00:08 -0400 Received: from gw03.mail.saunalahti.fi ([195.197.172.111]:42962 "EHLO gw03.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761338AbZCRWAF (ORCPT ); Wed, 18 Mar 2009 18:00:05 -0400 X-Greylist: delayed 629 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Mar 2009 18:00:05 EDT From: Dmitri Vorobiev To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Cc: Dmitri Vorobiev Subject: [PATCH 1/3] Restrict definition of a variable in kernel/sysctl.c Date: Wed, 18 Mar 2009 23:49:25 +0200 Message-Id: <1237412967-20754-1-git-send-email-dmitri.vorobiev@movial.com> X-Mailer: git-send-email 1.5.6.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1285 Lines: 44 The variable "one" in kernel/sysctl.c is used only if either CONFIG_HIGHMEM, or CONFIG_DETECT_SOFTLOCKUP are defined (or both). Hence, if neither option is enabled, the following error is produced: CC kernel/sysctl.o kernel/sysctl.c:99: warning: 'one' defined but not used This patch fixes the warning by moving the variable definition under an appropriate preprocessor construct. Signed-off-by: Dmitri Vorobiev --- kernel/sysctl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c5ef44f..f172d9f 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -95,12 +95,15 @@ static int sixty = 60; static int neg_one = -1; #endif +#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM) +static int one = 1; +#endif + #if defined(CONFIG_MMU) && defined(CONFIG_FILE_LOCKING) static int two = 2; #endif static int zero; -static int one = 1; static unsigned long one_ul = 1; static int one_hundred = 100; -- 1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/