Skip to content

Commit

Permalink
generic: fix compilation warning for ar8xxx swconfig
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ansuel authored and dangowrt committed Mar 27, 2022
1 parent 327b6db commit 49d9d2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions target/linux/generic/files/drivers/net/phy/ar8216.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion target/linux/generic/files/drivers/net/phy/ar8327.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 49d9d2b

Please sign in to comment.