[PATCH 11/31] clk: mediatek: mux: Clean up included headers

Chen-Yu Tsai wenst at chromium.org
Tue Jan 25 22:32:14 PST 2022


On Wed, Jan 26, 2022 at 1:38 AM Miles Chen <miles.chen at mediatek.com> wrote:
>
> > Some included headers aren't actually used anywhere, while other headers
> > with the declaration of functions and structures aren't directly
> > included.
> >
> > Get rid of the unused ones, and add the ones that should be included
> > directly.
> >
> > On the header side, replace headers that are included purely for data
> > structure definitions with forward declarations. This decreases the
> > amount of preprocessing and compilation effort required for each
> > inclusion.
>
> Is this inspired by [1]?
> [1] https://lore.kernel.org/lkml/YdIfz+LMewetSaEB@gmail.com/

Yes and no.

When clk-mtk.h was removed from the included headers, many headers had
to be added. Also, clk-mux.h did not include any headers, so if it were
to be used by itself, it probably would not compile.

Using forward declarations for the data structures instead of including the
header files inspired in part by that series though.

ChenYu



More information about the Linux-mediatek mailing list