diff options
author | Edward Cree <ecree.xilinx@gmail.com> | 2022-11-14 13:15:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-16 09:07:02 +0000 |
commit | 5ae0c22634029da089dc7ce2602679ba9005dc51 (patch) | |
tree | 6e6f3b45dad248368984ba6e7b85637be62499da /drivers/net | |
parent | 7d63b21d2745d86994b2d0f2371c4e7027138b39 (diff) |
sfc: fix ef100 RX prefix macro
Macro PREFIX_WIDTH_MASK uses unsigned long arithmetic for a shift of up
to 32 bits, which breaks on 32-bit systems. This did not previously
show up as we weren't using any fields of width 32, but we now need to
access ESF_GZ_RX_PREFIX_USER_MARK.
Change it to unsigned long long.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/sfc/ef100_rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_rx.c b/drivers/net/ethernet/sfc/ef100_rx.c index 65bbe37753e6..0721260cf2da 100644 --- a/drivers/net/ethernet/sfc/ef100_rx.c +++ b/drivers/net/ethernet/sfc/ef100_rx.c @@ -21,7 +21,7 @@ /* Get the value of a field in the RX prefix */ #define PREFIX_OFFSET_W(_f) (ESF_GZ_RX_PREFIX_ ## _f ## _LBN / 32) #define PREFIX_OFFSET_B(_f) (ESF_GZ_RX_PREFIX_ ## _f ## _LBN % 32) -#define PREFIX_WIDTH_MASK(_f) ((1UL << ESF_GZ_RX_PREFIX_ ## _f ## _WIDTH) - 1) +#define PREFIX_WIDTH_MASK(_f) ((1ULL << ESF_GZ_RX_PREFIX_ ## _f ## _WIDTH) - 1) #define PREFIX_WORD(_p, _f) le32_to_cpu((__force __le32)(_p)[PREFIX_OFFSET_W(_f)]) #define PREFIX_FIELD(_p, _f) ((PREFIX_WORD(_p, _f) >> PREFIX_OFFSET_B(_f)) & \ PREFIX_WIDTH_MASK(_f)) |