[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ2PR11MB751841C63A37996E16B8A0A5A0D22@SJ2PR11MB7518.namprd11.prod.outlook.com>
Date: Fri, 14 Mar 2025 07:33:27 +0000
From: "Mekala, SunithaX D" <sunithax.d.mekala@...el.com>
To: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Knitter, Konrad"
<konrad.knitter@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>, "Michal
Swiatkowski" <michal.swiatkowski@...ux.intel.com>, Simon Horman
<horms@...nel.org>, Kees Cook <kees@...nel.org>, Jiri Slaby
<jirislaby@...nel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net v2] ice: health.c: fix
compilation on gcc 7.5
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Przemek Kitszel
> Sent: Thursday, February 6, 2025 2:30 PM
> To: intel-wired-lan@...ts.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen@...el.com>
> Cc: netdev@...r.kernel.org; Knitter, Konrad <konrad.knitter@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Zhuo, Qiuxu <qiuxu.zhuo@...el.com>; Michal Swiatkowski > <michal.swiatkowski@...ux.intel.com>; Simon Horman <horms@...nel.org>; Kees Cook <kees@...nel.org>; Jiri Slaby <jirislaby@...nel.org>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: health.c: fix compilation on gcc 7.5
>
> GCC 7 is not as good as GCC 8+ in telling what is a compile-time
> const, and thus could be used for static storage.
> Fortunately keeping strings as const arrays is enough to make old
> gcc happy.
>
> Excerpt from the report:
> My GCC is: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0.
>
> CC [M] drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.o
> drivers/net/ethernet/intel/ice/devlink/health.c:35:3: error: initializer element is not constant
> ice_common_port_solutions, {ice_port_number_label}},
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/ice/devlink/health.c:35:3: note: (near initialization for 'ice_health_status_lookup[0].solution')
> drivers/net/ethernet/intel/ice/devlink/health.c:35:31: error: initializer element is not constant
> ice_common_port_solutions, {ice_port_number_label}},
> ^~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/ice/devlink/health.c:35:31: note: (near initialization for 'ice_health_status_lookup[0].data_label[0]')
> drivers/net/ethernet/intel/ice/devlink/health.c:37:46: error: initializer element is not constant
> "Change or replace the module or cable.", {ice_port_number_label}},
> ^~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/ice/devlink/health.c:37:46: note: (near initialization for 'ice_health_status_lookup[1].data_label[0]')
> drivers/net/ethernet/intel/ice/devlink/health.c:39:3: error: initializer element is not constant
> ice_common_port_solutions, {ice_port_number_label}},
> ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 85d6164ec56d ("ice: add fw and port health reporters")
> Reported-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>
> Closes: https://lore.kernel.org/netdev/CY8PR11MB7134BF7A46D71E50D25FA7A989F72@CY8PR11MB7134.namprd11.prod.outlook.com
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Suggested-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> ---
> v2: use static const char[] instead of #define - Simon
> +added RB tag from Michal, but not adding TB tag from Qiuxu
>
> v1:
> https://lore.kernel.org/netdev/20250205104252.30464-2-przemyslaw.kitszel@intel.com
>
> CC: Kees Cook <kees@...nel.org>
> CC: Jiri Slaby <jirislaby@...nel.org>
> ---
> drivers/net/ethernet/intel/ice/devlink/health.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Tested-by: Sunitha Mekala <sunithax.d.mekala@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists