Skip to content

Conversation

mathieuchopstm
Copy link
Contributor

Include <mem.h> from the root DTSI in all series and remove it from other levels of the DTSI inclusion hierarchy. This cleans up some duplicate inclusions and is just more maintainable in the long term (especially since new series copy the existing bad pattern).

STM32WB0, STM32MP1, STM32MP13 and STM32MP2 are not modified because they already include <mem.h> from root.

Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant.

There is no consistency about which level of the DTSI inclusion hierarchy
the macros from this header start being used, so including it from the root
file ensures they are always visible and available without headache. Today,
there are places where the header is included twice or more at different
DTSI inclusion hierarchy levels because of this ambiguity - this commit
solves the issue once and for all.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
Include <mem.h> from the series' root DTSI file and remove inclusion of
the file from other levels since it becomes redundant. This avoids the
current situation where the same #include directive is duplicated among
many files, and where the file is sometimes included multiple times when
walking up the inclusion chain up until the root DTSI file.

Signed-off-by: Mathieu Choplain <[email protected]>
@mathieuchopstm
Copy link
Contributor Author

@erwango I'll let you tag with v4.3.0 or future milestone depending on what you think is best.

Copy link

@erwango erwango added this to the v4.3.0 milestone Oct 20, 2025
Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 minor issue yet to fix.

};
};
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems your editor added an extra empty line here. Could you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other files seem to end with an empty newline so I think it's fine to keep it.
(I already noticed this but didn't edit PR for this reason)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, github fooled me, you don't add any empty line here.

};
};
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, github fooled me, you don't add any empty line here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants