lkml.org 
[lkml]   [2018]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] pin control bulk changes for v4.16
On Fri, Feb 2, 2018 at 5:28 AM, Linus Walleij <linus.walleij@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

#include <linux/pinctrl/devinfo.h>

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:

#ifdef CONFIG_PINCTRL
struct dev_pin_info *pins;
#endif

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:

+struct device;
+

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

struct dev_pin_info;

declaration, and removing the <linux/pinctrl/devinfo.h> include.

Hmm?

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
tooling? Ingo?

Linus

\
 
 \ /
  Last update: 2018-02-02 23:57    [W:0.103 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site