]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Check egress tagging of CFP rule with proper accessor
authorVladimir Oltean <olteanv@gmail.com>
Wed, 3 Feb 2021 19:39:18 +0000 (21:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Feb 2021 03:08:52 +0000 (19:08 -0800)
commitb9552ec9759e1bb0a92fef47c69caa54dde2e137
treedef7bb69c73d5da7fda648dfcc0dc5a58af9c903
parent31c2a84c0f3273045f01b9d3ad9861a416d477ce
net: dsa: bcm_sf2: Check egress tagging of CFP rule with proper accessor

The flow steering struct ethtool_flow_ext::data field is __be32, so when
the CFP code needs to check the VLAN egress tagging attribute in bit 0,
it does this in CPU native endianness. So logically, the endianness
conversion is set up the other way around, although in practice the same
result is produced.

Gets rid of build warning:

warning: cast from restricted __be32
warning: incorrect type in argument 1 (different base types)
   expected unsigned int [usertype] val
   got restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: cast from restricted __be32
warning: restricted __be32 degrades to integer

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210203193918.2236994-1-olteanv@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/bcm_sf2_cfp.c