Re: [PATCH 0/5] Header includes cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please wrap your lines at ca. 75 columns.

Nathaniel P Dawson schrieb:
> This is just the beginning for this project. I'm slowly cleaning up
> the header includes one chunk at a time. I hope my patches aren't too
> messy, I've learned how to better utilize git to make patches and
> organize my commits logically so I'll submit neater chunks henceforth.
> You can expect patches from me nightly until I've finished this project.

You have removed includes that are implied by other includes, i.e. if
foo.h includes bar.h, then you removed #include "bar.h" from *.c if there
is #include "foo.h".

IMO, this is not a good guiding principle to reduce includes. A better
principle is to keep #include "bar.h" in a source or header file iff a
feature that is declared or defined in bar.h is *used* *directly* in that
source or header file, regardless of whether bar.h is included in foo.h
that is itself included in that source or header file.

If this latter principle is obeyed, then the build won't break by removing
the include of foo.h (for the reason that nothing of foo.h is *use*
*directly* anymore).

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux