On Wed, 26 Jun 2019, Rob Herring wrote: > On Wed, Jun 26, 2019 at 9:16 AM Paul Walmsley <paul.walmsley@xxxxxxxxxx> wrote: > > > > On Tue, 25 Jun 2019, Rob Herring wrote: > > > > > Minimally, for anyone submitting and applying schema patches, > > > 'dt_binding_check' should pass and not have warnings. Just like > > > compiling C code. I'd like to make it part of the default target, but > > > things are a bit immature still and once we have all 3500 bindings > > > converted, it will be too slow. > > > > Maybe it would be better if dt_binding_check respected the ARCH > > environment variable in the kernel tree? That would speed things up, and > > most kernel developers are probably only concerned with DT files in their > > particular architecture. Then the existing 'dt_binding_check' > > functionality that ignores ARCH could be renamed to something like > > 'dt_binding_check_all'. > > The vast majority of bindings have nothing to do with the $ARCH. You > could do things like artificially associate the SiFive UART with > RiscV, but then when things happen like Freescale PPC networking chips > moving to Arm or just the mixture between arm and arm64 that all > breaks. You're right. Cleanly implementing something like this looks like it would be more painful than it would be worth. > > > BTW, much of this applies to just building dtbs with W=1 or W=12 which > > > turns on a bunch of dtc checks. Hopefully, riscv can be warning free > > > from the start (before you have a 1000 boards). > > > > The upstream RISC-V DTBs don't generate any warnings for "make dtbs W=2", > > so I think we're in pretty good shape there. > > Note that 'W=2' doesn't include what 'W=1' turns on. You have to do > 'W=12' for everything and the more important things are in 'W=1'. Not > the most obvious interface IMO. OK, I didn't know that either. In any case, we're also clean with W=12. > > > For this case specifically, I'll look at how to restructure the cpu > > > schemas. You need to fix the dtc warnings. > > > > I wasn't aware of 'dt_binding_check' and 'dtbs_check'. Thanks for the > > pointer. I'll look at the YAML-derived dtc warnings. For the sake of the archives, that patch was written and sent and is available here: https://lore.kernel.org/linux-riscv/alpine.DEB.2.21.9999.1906260829030.21507@xxxxxxxxxxxxxxxx/T/#u > > Sounds like 'make dt_binding_check' and 'make dtbs_check' need to be added > > to Documentation/process/submitting-patches.rst, if the expectation is > > that everyone should run them. > > See Documentation/devicetree/writing-schema.md > > The DT specifics for submitting patches are in: > Documentation/devicetree/bindings/submitting-patches.txt OK, good to know. > Still, we probably need to add something about schema there. Then > there's only 1 entry point for people to not read. Yep, seems like a good idea. - Paul