Re: [PATCH v2 1/2] kernel-doc: don't let V=1 change outcome

From: Johannes Berg
Date: Fri Jun 09 2023 - 04:43:10 EST


On Thu, 2023-06-08 at 08:51 +0900, Masahiro Yamada wrote:
> >
> > > cmd_checkdoc = $(srctree)/scripts/kernel-doc -none \
> > > $(KDOCFLAGS)
> > >
> > >
> > > Then, users can do
> > >
> > > $ make KDOCFLAGS=-Wall
> > > $ make KDOCFLAGS=-Wreturn
> >
> > I'd rather call it KDOC_FLAGS if you don't mind to align with
> > KDOC_WERROR which we have already, but sure, can do.
>
>
> I just tried to be consistent with
> CPPFLAGS, CFLAGS, AFLAGS, CHECKFLAGS etc.
> (CHECKFLAGS is for sparse) because
> you apparently mimick compiler flags in kernel-doc.


OK, sure, works for me. I made it mimic compiler flags because it was
already doing it for -Werror :)

> BTW, kernel-doc is invoked from Documentation/Makefile too.
>
> Do we need to pass the same flags to both of them?

It doesn't look like we _can_ in that case, at least not from the build
system, it'd have to be in kerneldoc.py or something. I also didn't
think it was that important, so I left it.

johannes