Skip to contentSkip to conversation

RDMA/bnxt_re: Fix the error due to the array depth

PATCH In review Selvin Xavier 2 participants 3 messages Feb 4, 2025

Subsystems (2)
lore
Share & tools
lore

Selvin Xavier

author maintainer
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Fix the error due to the array depth

Fixing the issue reported by kernel test robot

drivers/infiniband/hw/bnxt_re/debugfs.h:34:40: error: variably modified 'gen0_parms' at file scope

Using the fixed size depth for the array.

Fixes a3c71713d954 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
---
 drivers/infiniband/hw/bnxt_re/debugfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/bnxt_re/debugfs.h +2 -2
index 3374097..8f101df 100644
@@ -21,7 +21,7 @@ void bnxt_re_unregister_debugfs(void);
 #define CC_CONFIG_GEN_EXT(x, y)	(((x) << 16) | (y))
 #define CC_CONFIG_GEN0_EXT0  CC_CONFIG_GEN_EXT(0, 0)
 
-#define BNXT_RE_CC_PARAM_GEN0	__ffs(CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP)
+#define BNXT_RE_CC_PARAM_GEN0  14
 
 struct bnxt_re_cc_param {
 	struct bnxt_re_dev *rdev;
@@ -31,6 +31,6 @@ struct bnxt_re_cc_param {
 };
 
 struct bnxt_re_dbg_cc_config_params {
-	struct bnxt_re_cc_param        gen0_parms[BNXT_RE_CC_PARAM_GEN0];
+	struct bnxt_re_cc_param	gen0_parms[BNXT_RE_CC_PARAM_GEN0];
 };
 #endif
Signature · 1 line
2.5.5
#1 lore raw
Quoted 6 lines · Selvin Xavier

Fixing the issue reported by kernel test robot

drivers/infiniband/hw/bnxt_re/debugfs.h:34:40: error: variably modified 'gen0_parms' at file scope

Using the fixed size depth for the array.

Quoted 7 lines
Fixes a3c71713d954 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
---
 drivers/infiniband/hw/bnxt_re/debugfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, I squashed this patch into "RDMA/bnxt_re: Congestion control settings using debugfs hook".

author maintainer
#2 lore raw
Quoted 16 lines · Leon Romanovsky
Quoted 6 lines · Selvin Xavier

Fixing the issue reported by kernel test robot

drivers/infiniband/hw/bnxt_re/debugfs.h:34:40: error: variably modified 'gen0_parms' at file scope

Using the fixed size depth for the array.

Quoted 7 lines
Fixes a3c71713d954 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
---
 drivers/infiniband/hw/bnxt_re/debugfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 2 lines

Thanks, I squashed this patch into "RDMA/bnxt_re: Congestion control settings using debugfs hook".

Sure thanks