Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755888Ab0BTOKf (ORCPT ); Sat, 20 Feb 2010 09:10:35 -0500 Received: from mail-yx0-f200.google.com ([209.85.210.200]:57075 "EHLO mail-yx0-f200.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755305Ab0BTOKe (ORCPT ); Sat, 20 Feb 2010 09:10:34 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=CqWMUe8RKj79NGKgJWxJSXAB/sIE0T1XhGoQCrUcwZXXvZqbWQTykyrfJkkRi4pdc3 xVZQCHm8hG7DMysbPbIQ9mCP5mbEcWMhWWLCcEv/DiqDWcQIBi7j7uBsR27jP3QnnJpH 7SgZYwRIPTl4XrGxBXTKIvECaoxFqZldaUvaE= Date: Sat, 20 Feb 2010 22:10:23 +0800 From: Dave Young To: Andrew Morton , Oleg Nesterov , Rusty Russell , Ivan Kokshaysky , David Howells , Ingo Molnar , Peter Zijlstra , James Morris , "Eric W. Biederman" , linux-kernel@vger.kernel.org Subject: [PATCH 04/18] sysctl extern cleanup - binfmts Message-ID: <20100220141023.GC3195@darkstar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1720 Lines: 54 Extern declarations in sysctl.c should be move to their own head file, and then include them in relavant .c files. Move core_uses_pid/core_pattern/core_pipe_limit extern declarations to linux/binfmts.h suid_dumpable is declared in binfmts.h already. Signed-off-by: Dave Young --- include/linux/binfmts.h | 6 ++++++ kernel/sysctl.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) --- linux-2.6.32.orig/kernel/sysctl.c 2010-02-20 14:06:33.374900066 +0800 +++ linux-2.6.32/kernel/sysctl.c 2010-02-20 14:06:42.621567640 +0800 @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -70,10 +71,6 @@ #if defined(CONFIG_SYSCTL) /* External variables not in a header file. */ -extern int core_uses_pid; -extern int suid_dumpable; -extern char *core_pattern; -extern unsigned int core_pipe_limit; extern int pid_max; extern int min_free_kbytes; extern int pid_max_min, pid_max_max; --- linux-2.6.32.orig/include/linux/binfmts.h 2010-02-20 14:02:26.958258402 +0800 +++ linux-2.6.32/include/linux/binfmts.h 2010-02-20 14:06:42.621567640 +0800 @@ -20,6 +20,12 @@ struct pt_regs; #ifdef __KERNEL__ #include +#ifdef CONFIG_SYSCTL +extern int core_uses_pid; +extern char *core_pattern; +extern unsigned int core_pipe_limit; +#endif + #define CORENAME_MAX_SIZE 128 /* -- 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/