The branch main has been updated by kbowling:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=146ae81c6a5c72779bee81f1d5d5913491ae4eef

commit 146ae81c6a5c72779bee81f1d5d5913491ae4eef
Author:     Przemyslaw Ciesielski <[email protected]>
AuthorDate: 2025-02-06 16:08:44 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-11 18:47:58 +0000

    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: [email protected]
    
    Signed-off-by: Przemyslaw Ciesielski <[email protected]>
    Signed-off-by: Anatoly Burakov <[email protected]>
    Acked-by: Bruce Richardson <[email protected]>
    
    Obtained from:  DPDK (b932270c66)
    MFC after:      2 weeks
---
 sys/dev/e1000/e1000_nvm.c | 4 ++--
 1 file 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;
 }

Reply via email to