[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200504112552.4dbdd2a9@canb.auug.org.au>
Date: Mon, 4 May 2020 11:25:52 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Christoph Hellwig <hch@....de>
Cc: Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [PATCH 3/5] sysctl: remove all extern declaration from sysctl.c
Hi Christoph,
On Fri, 24 Apr 2020 08:43:36 +0200 Christoph Hellwig <hch@....de> wrote:
>
> 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 <hch@....de>
> ---
> include/linux/coredump.h | 4 ++++
> include/linux/file.h | 2 ++
> include/linux/mm.h | 2 ++
> include/linux/mmzone.h | 2 ++
> include/linux/pid.h | 3 +++
> include/linux/sysctl.h | 8 +++++++
> kernel/sysctl.c | 45 +++-------------------------------------
> 7 files changed, 24 insertions(+), 42 deletions(-)
A couple of suggestions for another patch (since this one is in a
shared branch in Al's tree now):
There is an "extern struct ctl_table random_table[];" in
drivers/char/random.c which is redundant now (in fact always was).
There is already an "extern struct ctl_table epoll_table[];" in
include/linux/poll.h, so could have included that in kernel/sysctl.c
instead of adding the new one in include/linux/sysctl.h
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists