From: Nihar Chaithanya Date: Sat, 4 Jan 2025 17:19:15 +0000 (+0530) Subject: octeontx2-pf: mcs: Remove dead code and semi-colon from rsrc_name() X-Git-Tag: v6.14-rc1~162^2~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49afc040f4d707a4149a05180edc42bc590641a4;p=thirdparty%2Flinux.git 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 Link: https://patch.msgid.link/20250104171905.13293-1-niharchaithanya@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c index 6cc7a78968fc1..f3b9daffaec3c 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c @@ -133,9 +133,7 @@ static const char *rsrc_name(enum mcs_rsrc_type rsrc_type) return "SA"; default: return "Unknown"; - }; - - return "Unknown"; + } } static int cn10k_mcs_alloc_rsrc(struct otx2_nic *pfvf, enum mcs_direction dir,