Re: [PATCH v2 2/3] dt-bindings: wire style checker into dt_binding_check
From: Rob Herring
Date: Thu May 07 2026 - 13:01:08 EST
On Thu, May 07, 2026 at 05:26:41PM +0800, Nathan Chancellor wrote:
> On Wed, May 06, 2026 at 01:44:47PM -0500, Rob Herring wrote:
> > On Wed, Apr 29, 2026 at 03:21:33PM +0100, Daniel Golle wrote:
> > > diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> > > index 7b668f7fd400..35ddd0b7a349 100644
> > > --- a/Documentation/devicetree/bindings/Makefile
> > > +++ b/Documentation/devicetree/bindings/Makefile
> > > @@ -46,6 +46,19 @@ quiet_cmd_chk_bindings = CHKDT $(src)
> > > xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \
> > > && touch $@ || true
> > >
> > > +DT_CHK_STYLE = $(srctree)/scripts/dtc/dt-check-style
> > > +
> > > +# Feed the file list to the checker via @argfile in a single Python
> > > +# process so the ruamel.yaml import is paid once. scripts/jobserver-exec
> > > +# claims slots from the GNU make jobserver and exposes the count via
> > > +# $PARALLELISM, which dt-check-style picks up to size its worker pool.
> > > +quiet_cmd_chk_style = STYLE $(src)
> > > + cmd_chk_style = f=$$(mktemp) && $(find_cmd) > $$f && \
> > > + $(PYTHON3) $(srctree)/scripts/jobserver-exec \
> > > + $(PYTHON3) $(DT_CHK_STYLE) @$$f; \
> >
> > What's the reason to run via PYTHON3 vs. running dt-check-style
> > directly? It's just different from the rest of this makefile.
>
> In general, scripts should be called with an explicit interpreter to
>
> 1. not rely on the file being executable (I think quilt has issues with
> this at times?)
Does that apply to external scripts? Not the case here, but for the rest
of this file that is the case.
Rob