mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
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>
This commit is contained in:
parent
bc1b50309c
commit
495083807f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue