From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90954C5518A for ; Wed, 22 Apr 2020 12:36:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5D6982084D for ; Wed, 22 Apr 2020 12:36:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D6982084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xmission.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E82678E0018; Wed, 22 Apr 2020 08:36:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E33BF8E0003; Wed, 22 Apr 2020 08:36:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFA858E0018; Wed, 22 Apr 2020 08:36:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0203.hostedemail.com [216.40.44.203]) by kanga.kvack.org (Postfix) with ESMTP id B83708E0003 for ; Wed, 22 Apr 2020 08:36:22 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 80C562C8F for ; Wed, 22 Apr 2020 12:36:22 +0000 (UTC) X-FDA: 76735439004.28.slope48_8ee0946c0f126 X-HE-Tag: slope48_8ee0946c0f126 X-Filterd-Recvd-Size: 5038 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Apr 2020 12:36:21 +0000 (UTC) Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jREbz-0000ox-TI; Wed, 22 Apr 2020 06:36:19 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jREbz-0006MT-03; Wed, 22 Apr 2020 06:36:19 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Christoph Hellwig Cc: Kees Cook , Iurii Zaikin , Luis Chamberlain , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org References: <20200417064146.1086644-1-hch@lst.de> <20200417064146.1086644-5-hch@lst.de> Date: Wed, 22 Apr 2020 07:33:11 -0500 In-Reply-To: <20200417064146.1086644-5-hch@lst.de> (Christoph Hellwig's message of "Fri, 17 Apr 2020 08:41:44 +0200") Message-ID: <87d07z4s54.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jREbz-0006MT-03;;;mid=<87d07z4s54.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/34tuHHASgF60MVP0xOvnRF+fIQ45pLt8= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH 4/6] sysctl: remove all extern declaration from sysctl.c X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Christoph Hellwig writes: > Extern declarations in .c files are a bad style and can lead to > mismatches. Use existing definitions in headers where they exist, > and otherwise move the external declarations to suitable header > files. > > Signed-off-by: Christoph Hellwig > --- > include/linux/coredump.h | 6 ++++++ > include/linux/file.h | 2 ++ > include/linux/mm.h | 2 ++ > include/linux/mmzone.h | 2 ++ > include/linux/sysctl.h | 8 +++++++ > kernel/sysctl.c | 45 +++------------------------------------- > 6 files changed, 23 insertions(+), 42 deletions(-) > > diff --git a/include/linux/coredump.h b/include/linux/coredump.h > index abf4b4e65dbb..0fe8f3131e97 100644 > --- a/include/linux/coredump.h > +++ b/include/linux/coredump.h > @@ -22,4 +22,10 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); > static inline void do_coredump(const kernel_siginfo_t *siginfo) {} > #endif > > +extern int core_uses_pid; > +extern char core_pattern[]; > +extern unsigned int core_pipe_limit; > +extern int pid_max; > +extern int pid_max_min, pid_max_max; These last two pid_max, pid_max_mind and pid_max_max would make more sense in pid.h as they have nothing to do with coredumps. > + > #endif /* _LINUX_COREDUMP_H */