Re: [GIT pull] core/entry for v6.6-rc1

From: Linus Torvalds
Date: Mon Aug 28 2023 - 17:34:18 EST


On Mon, 28 Aug 2023 at 14:07, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Heh. Lovely. I wonder if we have other cases of #ifdef's that just
> aren't #define'd anywhere any more.
>
> But I'm too lazy and/or incompetent to write up some trivial script to check.

I shamed myself into writing two one-liner scripts to create a list of
identifiers we do 'ifdef' on, and another list of identifiers we
#define somewhere.

And then just run 'comm -13' on the two.

And it turns out to be useless, because even after I filter out our
config options (which get #define'd separately), we end up having a
ton of identifiers that we just expect to be set from outside,. or are
just random noise in drivers (some of it more random than others: the
spca501.c tests for ALTER_GAMA in addition to ALTER_GAMMA, which I
assume is just a typo).

Several of them seem to be quite reasonable (ie deflate has
UNALIGNED_OK, expecting people to use -DUNALIGNED_OK from the build),
but it does mean that at least my trivial "let's see what symbols we
test without ever defining" idea was just simplistic garbage.

As so many of my ideas are...

Linus