[dpdk-dev] [EXT] [PATCH 1/4] net/qede: fix build with gcc 11

Rasesh Mody rmody at marvell.com
Fri Sep 25 06:27:58 CEST 2020


Hi Ferruh,

>From: Ferruh Yigit <ferruh.yigit at intel.com>
>Sent: Monday, September 21, 2020 6:38 AM
>
>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.yigit at 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.

The existing behavior needs to be fixed, I'll send a proper fix for 20.11.

Thanks!
-Rasesh



More information about the dev mailing list