drivers/net: fix shifting 32-bit signed variable 31 times
authorAndrius Sirvys <andrius.sirvys@intel.com>
Tue, 19 Feb 2019 13:24:50 +0000 (13:24 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 1 Mar 2019 17:17:36 +0000 (18:17 +0100)
commit902f389f9b4cad1feba320e8b779432eeb76cada
treed3ca28674479374dcca355c943b3a7fe1cee9457
parentfef6b216390f33c066ea15e9de7845dfc3ab6d6a
drivers/net: fix shifting 32-bit signed variable 31 times

Shifting signed 32-bit values by 31-bits has the potential for
unexpected  outcomes as compiler can overwrite a bit.
Specified that values are unsigned.

Errors are observed from running cppcheck.

Bugzilla ID: 58
Fixes: 69e209be5464 ("net/axgbe: add register map and related macros")
Fixes: b5bf7719221d ("bnx2x: driver support routines")
Fixes: ed2ced6fe927 ("net/bnxt: check initialization before accessing stats")
Fixes: 6fda3f0ddda9 ("net/cxgbe: add API to program hardware MPS table")
Fixes: bdb244b96920 ("e1000: whitespace changes")
Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
Fixes: defb9a5dd156 ("nfp: introduce driver initialization")
Fixes: ec94dbc57362 ("qede: add base driver")
Fixes: d2e7d931d0ad ("net/qede/base: formatting changes")
Fixes: cdc07e83bb24 ("net/tap: add eBPF program file")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
14 files changed:
drivers/net/axgbe/axgbe_common.h
drivers/net/bnx2x/ecore_hsi.h
drivers/net/bnx2x/ecore_reg.h
drivers/net/bnx2x/elink.h
drivers/net/bnxt/bnxt.h
drivers/net/cxgbe/base/t4_hw.c
drivers/net/e1000/base/e1000_82575.h
drivers/net/e1000/base/e1000_ich8lan.c
drivers/net/nfp/nfp_net_ctrl.h
drivers/net/qede/base/common_hsi.h
drivers/net/qede/base/ecore_hsi_common.h
drivers/net/qede/base/ecore_hsi_eth.h
drivers/net/qede/base/ecore_hw_defs.h
drivers/net/tap/tap_bpf_program.c