Commit 3802bf54 authored by Kumar Gala's avatar Kumar Gala Committed by Carles Cufi
Browse files

scripts: dts: gen_legacy_defines: mark DT_INST macros deprecated



Add a __WARN("Macro is deprecated") to all DT_INST macros now that all
in tree users should have been converted to the new macros.

This is intended to make sure any PRs don't introduce new usages of
these macros.

Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 5c9e414a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -744,10 +744,17 @@ def out(ident, val, aliases=(), deprecation_msg=None):
    out_define(ident, val, deprecation_msg, header_file)
    primary_ident = f"DT_{ident}"

    d_msg = deprecation_msg

    for alias in aliases:
        if alias != ident:
            if alias.startswith("INST_"):
                deprecation_msg = "Macro is deprecated"

            out_define(alias, "DT_" + ident, deprecation_msg, header_file)

            deprecation_msg = d_msg

    return primary_ident