diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2022-03-01 16:47:11 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-03-27 04:51:38 +0100 |
commit | 49d9d2b2105d3b547dd4ae35a691ed6eec6b4845 (patch) | |
tree | 57f0d446154c8acfcacc9557ae289d0fbdd07512 | |
parent | 327b6dbd98ed98be04eb891d9682ae212fe9f09d (diff) | |
download | upstream-49d9d2b2105d3b547dd4ae35a691ed6eec6b4845.tar.gz upstream-49d9d2b2105d3b547dd4ae35a691ed6eec6b4845.tar.bz2 upstream-49d9d2b2105d3b547dd4ae35a691ed6eec6b4845.zip |
generic: fix compilation warning for ar8xxx swconfig
There are 2 warning for ar8xxx swconfig.
- Fix not used dev variable when ETHERNET_PACKET_MANGLE
is not selected
- Convert fallthrough comment to compilation macro
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 2 | ||||
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8327.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 3e6494aebb..bf98fd599e 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -2433,7 +2433,9 @@ static int ar8xxx_phy_config_init(struct phy_device *phydev) { struct ar8xxx_priv *priv = phydev->priv; +#ifdef CONFIG_ETHERNET_PACKET_MANGLE struct net_device *dev = phydev->attached_dev; +#endif int ret; if (WARN_ON(!priv)) diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index dce52ce0e4..3313149559 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -183,7 +183,7 @@ ar8327_phy_fixup(struct ar8xxx_priv *priv, int phy) case 2: ar8xxx_phy_mmd_write(priv, phy, 0x7, 0x3c, 0x0); - /* fallthrough */ + fallthrough; case 4: ar8xxx_phy_mmd_write(priv, phy, 0x3, 0x800d, 0x803f); ar8xxx_phy_dbg_write(priv, phy, 0x3d, 0x6860); |