diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2018-07-13 17:57:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-16 23:43:31 +0300 |
commit | 495083807f2007af7a29ea72768866f747021a98 (patch) | |
tree | 856391730331c2b3ec2a1628abe2500d6819c9a0 /drivers/net/ethernet | |
parent | bc1b50309ce19bb2ccb1340fa83ab56ca6da8f96 (diff) | |
download | linux-495083807f2007af7a29ea72768866f747021a98.tar.xz |
net: mscc: simplify retrieving the tag type from the frame header
The tag type in the frame extraction header is only a bit wide. There's
no need to use GENMASK when retrieving the information. This patch
simplify the code by dropping GENMASK and using BIT instead.
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c index 18df7d934e81..26bb3b18f3be 100644 --- a/drivers/net/ethernet/mscc/ocelot_board.c +++ b/drivers/net/ethernet/mscc/ocelot_board.c @@ -29,7 +29,7 @@ static int ocelot_parse_ifh(u32 *ifh, struct frame_info *info) info->port = (ifh[2] & GENMASK(14, 11)) >> 11; info->cpuq = (ifh[3] & GENMASK(27, 20)) >> 20; - info->tag_type = (ifh[3] & GENMASK(16, 16)) >> 16; + info->tag_type = (ifh[3] & BIT(16)) >> 16; info->vid = ifh[3] & GENMASK(11, 0); return 0; |