Error observed with gcc 11 under development gcc (GCC) 11.0.0 20200920 (experimental)
build error: ../drivers/net/qede/qede_main.c: In function ‘qed_get_current_link’: ../drivers/net/qede/qede_main.c:587:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 587 | if (!ptt) | ^~ ../drivers/net/qede/qede_main.c:590:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 590 | qed_fill_link(hwfn, ptt, if_link); | ^~~~~~~~~~~~~ Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com> --- I am not clear what the exact intention of the original code is, compiler warning is about wrong indentation of 'qed_fill_link(..)', I have updated the code to keep the behavior same but fix the indentation. Please send a proper fix if the existing behavior needs to be updated. --- drivers/net/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index aecb98261..0f82568d3 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -587,7 +587,7 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link) if (!ptt) DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n"); - qed_fill_link(hwfn, ptt, if_link); + qed_fill_link(hwfn, ptt, if_link); if (ptt) ecore_ptt_release(hwfn, ptt); -- 2.26.2