net: enetc: document enetc_msg_vsi_send() return values
PATCH 1/1 net: enetc: document enetc_msg_vsi_send() return values
Smatch combines the return values together and wants all the callers to handle the positive values so it leads to static checker warnings. Add a comment explaining the return values.
Generally functions which return non-standard values should have a comment.
--- drivers/net/ethernet/freescale/enetc/enetc_vf.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/enetc/enetc_vf.c +4 -0
@@ -48,6 +48,10 @@ static void enetc_msg_dma_free(struct device *dev, struct enetc_msg_swbd *msg) } } +/* +* Returns: 0 on success, a negative errno on failure, or the positive IP +* minor revision for an ENETC_MSG_GET_IP_MN request. +*/ static int enetc_msg_vsi_send (struct enetc_si *si,struct enetc_msg_swbd *msg) {struct device *dev = &si->pdev->dev;
Signature · 1 line
2.53.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Sat, 26 Sep 2026 14:56:13 +0300 you wrote:
Smatch combines the return values together and wants all the callers to handle the positive values so it leads to static checker warnings. Add a comment explaining the return values.
Generally functions which return non-standard values should have a comment.
[...]
Here is the summary with links:
- net: enetc: document enetc_msg_vsi_send() return values
https://git.kernel.org/netdev/net-next/c/549f5f48f10e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html