[v2,30/34] net/ntnic: refactoring of the FPGA initialization

Message ID 20250205104548.1533554-31-sil-plv@napatech.com (mailing list archive)
State Accepted
Delegated to: Stephen Hemminger
Headers
Series net/ntnic: bugfixes and refactoring |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Serhii Iliushyk Feb. 5, 2025, 10:45 a.m. UTC
Remove unnecessary checks and logs.

Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
 drivers/net/ntnic/nthw/core/nthw_fpga.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
  

Patch

diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index 88641145ec..5ca186209a 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -265,18 +265,14 @@  int nthw_fpga_init(struct fpga_info_s *p_fpga_info)
 	nthw_rac_rab_flush(p_nthw_rac);
 	p_fpga_info->mp_nthw_rac = p_nthw_rac;
 
-	bool included = true;
 	struct nt200a0x_ops *nt200a0x_ops = get_nt200a0x_ops();
 
 	switch (p_fpga_info->n_nthw_adapter_id) {
 	case NT_HW_ADAPTER_ID_NT200A02:
 		if (nt200a0x_ops != NULL)
 			res = nt200a0x_ops->nthw_fpga_nt200a0x_init(p_fpga_info);
-
-		else
-			included = false;
-
 		break;
+
 	default:
 		NT_LOG(ERR, NTHW, "%s: Unsupported HW product id: %d", p_adapter_id_str,
 			p_fpga_info->n_nthw_adapter_id);
@@ -284,12 +280,6 @@  int nthw_fpga_init(struct fpga_info_s *p_fpga_info)
 		break;
 	}
 
-	if (!included) {
-		NT_LOG(ERR, NTHW, "%s: NOT INCLUDED HW product: %d", p_adapter_id_str,
-			p_fpga_info->n_nthw_adapter_id);
-		res = -1;
-	}
-
 	if (res) {
 		NT_LOG(ERR, NTHW, "%s: status: 0x%08X", p_adapter_id_str, res);
 		return res;