diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-10-08 15:44:50 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-08 15:44:50 -0700 |
commit | 9d49aea13f1e35869158abe7e314e16dc8f50ff1 (patch) | |
tree | c878d774db35fdb9834621e2f354973dc09f2702 /drivers/net/dsa/ocelot | |
parent | 9faebeb2d80065926dfbc09cb73b1bb7779a89cd (diff) | |
parent | 3fdd47c3b40ac48e6e6e5904cf24d12e6e073a96 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Small conflict around locking in rxrpc_process_event() -
channel_lock moved to bundle in next, while state lock
needs _bh() from net.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/ocelot')
-rw-r--r-- | drivers/net/dsa/ocelot/felix_vsc9959.c | 2 | ||||
-rw-r--r-- | drivers/net/dsa/ocelot/seville_vsc9953.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index a2b891af3153..3e925b8d5306 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -998,6 +998,8 @@ static int vsc9959_prevalidate_phy_mode(struct ocelot *ocelot, int port, */ static u16 vsc9959_wm_enc(u16 value) { + WARN_ON(value >= 16 * BIT(8)); + if (value >= BIT(8)) return BIT(8) | (value / 16); diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index e993f3eac3eb..76576cf0ba8a 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -1049,6 +1049,8 @@ static int vsc9953_prevalidate_phy_mode(struct ocelot *ocelot, int port, */ static u16 vsc9953_wm_enc(u16 value) { + WARN_ON(value >= 16 * BIT(9)); + if (value >= BIT(9)) return BIT(9) | (value / 16); |