Re: [PATCH v27 net-next 04/10] net/nebula-matrix: add common resource implementation
From: netdev-bot+sashiko@kernel.org
Date: 2026-09-11 03:41:48
Also in:
linux-doc, lkml
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: Critical: 0 · High: 0 · Medium: 0 · Low: 2 - [Low] DISCARDED (baseline decision false): claim that the commit message's statement 'The dispatch layer serializes all resource ops… - [Low] Kernel-doc/declaration mismatch for the new hw op: in drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h the… -- net/nebula-matrix: add common resource implementation This adds the chip-independent resource layer for the nbl driver, which owns the PF/eth/vsi identity tables and the lookup helpers between vsi_id, func_id, eth_id and pf_id. It also adds two new hardware ops, get_fw_eth_map() and get_board_info(), plus get_real_bus(), used during control-PF initialization.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/nebula-matrix/nbl/Makefile b/drivers/net/ethernet/nebula-matrix/nbl/Makefile
[ ... ]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h index be63e53d41c61..e05248c66afbb 100644 --- a/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_hw.h
[ ... ]
quoted hunk ↗ jump to hunk
@@ -35,11 +36,26 @@ struct nbl_hw_ops { * All-zero mask (0x00) means all 8 PFs enabled, which is * unsupported by the driver and rejected with -EINVAL. * + * Firmware contract: number of unmasked PFs MUST equal + * get_board_info()->eth_num. */ void (*get_host_pf_mask)(struct nbl_hw_mgt *hw_mgt, u32 *pf_mask); + void (*get_real_bus)(struct nbl_hw_mgt *hw_mgt, u8 *bus); void (*cfg_mailbox_qinfo)(struct nbl_hw_mgt *hw_mgt, u16 func_id, u8 bus, u8 devid, u8 function); + void (*get_fw_eth_map)(struct nbl_hw_mgt *hw_mgt, u32 *eth_map); + /** + * get_board_info - Fetch board info from firmware + * @hw_mgt: hardware management context + * @board_info: output pointer for board info structure + * + * Firmware contract: board_info.eth_num MUST equal the number of + * unmasked PFs from get_host_pf_mask(). See get_host_pf_mask for + * details. + */ + void (*get_board_info)(struct nbl_hw_mgt *hw_mgt, + struct nbl_board_port_info *board);
[Severity: Low] This isn't a bug, but the kernel-doc block for get_board_info in nbl_def_hw.h documents @board_info while the callback is declared with the parameter named board: * @board_info: output pointer for board info structure ... void (*get_board_info)(struct nbl_hw_mgt *hw_mgt, struct nbl_board_port_info *board); Would make W=1 warn here with "Excess function parameter 'board_info' description" and "Function parameter or struct member 'board' not described"? The implementation in nbl_hw_leonis.c uses the documented name: static void nbl_hw_get_board_info(struct nbl_hw_mgt *hw_mgt, struct nbl_board_port_info *board_info) so renaming the declared parameter to board_info would keep the three consistent. The mismatch is still present at the end of the series. [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260907123848.30256-1-illusion.wang%40nebula-matrix.com