diff options
| author | Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com> | 2025-02-06 16:08:44 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-11 18:47:58 +0000 |
| commit | 146ae81c6a5c72779bee81f1d5d5913491ae4eef (patch) | |
| tree | 74891877a0aeb54701bd8caa3cc4dd7f5b80f95b | |
| parent | 15a0db2101cd67eccd0be2ddf1ad18be1ea5afd0 (diff) | |
e1000: fix NVM data type in bit shift
DPDK commit message
net/e1000/base: fix NVM data type in bit shift
There is a static analysis warning due to wrong data types being used
for NVM read data shifts. Fix it via explicit type cast.
Fixes: 38db3f7f50bd ("e1000: update base driver")
Cc: stable@dpdk.org
Signed-off-by: Przemyslaw Ciesielski <przemyslaw.ciesielski@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Obtained from: DPDK (b932270c66)
MFC after: 2 weeks
| -rw-r--r-- | sys/dev/e1000/e1000_nvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/e1000/e1000_nvm.c b/sys/dev/e1000/e1000_nvm.c index 576f9047f5b5..8a26e1dd0427 100644 --- a/sys/dev/e1000/e1000_nvm.c +++ b/sys/dev/e1000/e1000_nvm.c @@ -961,14 +961,14 @@ s32 e1000_read_pba_num_generic(struct e1000_hw *hw, u32 *pba_num) DEBUGOUT("NVM Not Supported\n"); return -E1000_NOT_IMPLEMENTED; } - *pba_num = (u32)(nvm_data << 16); + *pba_num = (u32)nvm_data << 16; ret_val = hw->nvm.ops.read(hw, NVM_PBA_OFFSET_1, 1, &nvm_data); if (ret_val) { DEBUGOUT("NVM Read Error\n"); return ret_val; } - *pba_num |= nvm_data; + *pba_num |= (u32)nvm_data; return E1000_SUCCESS; } |
