Re: [PATCH v5 net-next 08/11] net/nebula-matrix: add vsi resource implementation

From: Andrew Lunn

Date: Sat Feb 28 2026 - 16:45:45 EST


> +static void nbl_hw_set_driver_status(struct nbl_hw_mgt *hw_mgt, bool active)
> +{
> + u32 status = 0;
> +
> + status = nbl_hw_rd32(hw_mgt, NBL_DRIVER_STATUS_REG);

No point initialising status if the first thing your do is assign to
it.

> +static int nbl_res_vsi_init_chip_module(struct nbl_resource_mgt *res_mgt)
> +{
> + u8 eth_speed = res_mgt->resource_info->board_info.eth_speed;
> + u8 eth_num = res_mgt->resource_info->board_info.eth_num;
> + struct nbl_hw_ops *hw_ops = res_mgt->hw_ops_tbl->ops;
> + struct nbl_hw_mgt *p = res_mgt->hw_ops_tbl->priv;
> + int ret = 0;
> +
> + ret = hw_ops->init_chip_module(p, eth_speed, eth_num);

Another example. Please review all the driver for such pointless
initialisation.

Andrew