Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

octeontx2-pf: mcs: Remove dead code and semi-colon from rsrc_name()

Every case in the switch-block ends with return statement, and the
default: branch handles the cases where rsrc_type is invalid and
returns "Unknown", this makes the return statement at the end of the
function unreachable and redundant.
The semi-colon is not required after the switch-block's curly braces.

Remove the semi-colon after the switch-block's curly braces and the
return statement at the end of the function.

This issue was reported by Coverity Scan.

Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Link: https://patch.msgid.link/20250104171905.13293-1-niharchaithanya@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Nihar Chaithanya and committed by
Jakub Kicinski
49afc040 21a8a77a

+1 -3
+1 -3
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
··· 133 133 return "SA"; 134 134 default: 135 135 return "Unknown"; 136 - }; 137 - 138 - return "Unknown"; 136 + } 139 137 } 140 138 141 139 static int cn10k_mcs_alloc_rsrc(struct otx2_nic *pfvf, enum mcs_direction dir,