On Fri, Feb 2, 2018 at 5:28 AM, Linus Walleij <linus.wall...@linaro.org> wrote:
> here is the big slew of changes in pin control for the v4.16 cycle.
So I pulled this, and then was surprised by how *everything* got
rebuilt even though it only touched pinctl files.
The reason for that seems to be that the pinctl pull got me this:
include/linux/pinctrl/devinfo.h | 2 +
and in include/linux/device.h we have
so pretty much *every* driver ends up depending on that silly two-line change.
I *think* that the only reason that happens is because of this:
struct dev_pin_info *pins;
and honestly, that could be trivially done by just having a forward
declaration, replacing the pinctrl/devinfo.h header include entirely.
Ironically, that two-line change to pinctrl/devinfo.h was a forward
declaration in the exact reverse direction:
so I would really prefer to speed up recompiles and just generally try
to avoid horrible header file inclusion by doing the same thing in
<linux/device.h>, adding just that
declaration, and removing the <linux/pinctrl/devinfo.h> include.
I also wonder if there are any automated tools that try to find these
kinds of crazy things. I suspect a lot of our build times is the poor
compiler just reading and parsing header files over and over again,
and a lot of them are probably not needed.
A year ago, Ingo did patches limit some of the header file issues for
the core headers (<linux/sched.h> in particular). Maybe he had