Re: [PATCH 3/5] sysctl: remove all extern declaration from sysctl.c

From: Christoph Hellwig
Date: Wed Apr 22 2020 - 13:24:36 EST


On Wed, Apr 22, 2020 at 12:30:22PM +0200, Vlastimil Babka wrote:
> On 4/21/20 7:15 PM, Christoph Hellwig 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.
>
> Your cleanup reminds me of this Andrew's sigh from last week [1].
> I'm not saying your series should do that too, just wondering if some of the
> moves you are doing now would be better suited for the hypothetical new header
> to avoid moving them again later (but I admit I haven't looked closer).
>
> [1]
> https://lore.kernel.org/linux-api/20200417174654.9af0c51afb5d9e35e5519113@xxxxxxxxxxxxxxxxxxxx/

I thought of that, but I'm not really sure it is worth it. I'd rather
move more sysctl implementations out of sysctl.c and just export
the tables back to it.