[PATCH] ARM: kirkwood: add missing <linux/if_ether.h> for ETH_ALEN

Andrew Lunn andrew at lunn.ch
Sun Aug 8 08:18:00 PDT 2021


> When building OpenWrt kernel which includes a backport of
> "of: net: pass the dst buffer to of_get_mac_address()", this is not the
> same as <linux/of_net.h> doesn't include <linux/phy.h> yet. This is
> because we miss commit 0c65b2b90d13c1 ("net: of_get_phy_mode: Change
> API to solve int/unit warnings") which has been in mainline for a long
> time.

That is quiet a big invasive patch, so i can understand it not being
backported. But on the flip side, it will make it harder getting
drivers upstream to mainline. And there are is one other big change,
how the MAC address is fetches from EEPROM, DT, etc.

> Sorry for the noise caused, I'm not sure what the policy is in this
> case

There is nothing in the coding style that all headers must be directly
included in the .c file. And it slows down the compiler having to pull
in a header file multiple times. You do see patches removing unused
includes. So i think OpenWRT should add yet another patch do deal with
its own breakage.

If you have more kirkwood, or Marvell boards in general in OpenWRT
which you want merged to mainline, i'm happy to review them.

      Andrew



More information about the linux-arm-kernel mailing list