[PATCH v1 1/9] net/nbl: address nbl channel integer handling issues 490942

Stephen Hemminger stephen at networkplumber.org
Tue Oct 28 21:49:49 CET 2025


On Mon, 27 Oct 2025 03:16:40 -0700
Dimon Zhao <dimon.zhao at nebula-matrix.com> wrote:

> Coverity issue: 490942
> 
> Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
> ---
>  drivers/net/nbl/nbl_hw/nbl_channel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/nbl/nbl_hw/nbl_channel.c b/drivers/net/nbl/nbl_hw/nbl_channel.c
> index 7cc214df01..17d9231dfe 100644
> --- a/drivers/net/nbl/nbl_hw/nbl_channel.c
> +++ b/drivers/net/nbl/nbl_hw/nbl_channel.c
> @@ -376,8 +376,8 @@ static uint16_t nbl_chan_update_txqueue(union nbl_chan_info *chan_info,
>  
>  	txq = &chan_info->mailbox.txq;
>  	next_to_use = txq->next_to_use;
> -	va = (u8 *)txq->buf + next_to_use * chan_info->mailbox.txq_buf_size;
> -	pa = txq->buf_mem.pa + next_to_use * chan_info->mailbox.txq_buf_size;
> +	va = (u8 *)txq->buf + (u64)next_to_use * (u64)chan_info->mailbox.txq_buf_size;
> +	pa = txq->buf_mem.pa + (u64)next_to_use * (u64)chan_info->mailbox.txq_buf_size;
>  	tx_desc = NBL_CHAN_TX_DESC(txq, next_to_use);
>  
>  	tx_desc->dstid = dstid;

Please use standard subject, like:

net/nbl: fix nbl channel integer handling

and add Fixes: line to track the original commit.

Also it is ok, to fix multiple Coverity issues in one commit.


More information about the dev mailing list