lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 14 Feb 2024 12:31:35 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Mark O'Donovan <shiftee@...teo.net>, <linux-kernel@...r.kernel.org>
CC: <alexandre.torgue@...s.st.com>, <joabreu@...opsys.com>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <mcoquelin.stm32@...il.com>, <netdev@...r.kernel.org>,
	<linux-stm32@...md-mailman.stormreply.com>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] net: stmmac: xgmac: fix initializer element is not
 constant error



On 2/12/2024 7:43 AM, Mark O'Donovan wrote:
> GCC prior to 8.x gives an "initializer element is not constant"
> error for the uses of dpp_tx_err in dwxgmac3_dma_dpp_errors.
> Newer compilers accept either version.
> 
> More info here:
> https://lore.kernel.org/all/20240103-fix-bq24190_charger-vbus_desc-non-const-v1-1-115ddf798c70@kernel.org
> 
> Signed-off-by: Mark O'Donovan <shiftee@...teo.net>
> ---

I'm not sure whether the Linux kernel project has an explicit cutoff for
what versions of GCC (or other compilers) are supported. GCC 8 was first
released in 2018.

The fix provided here is fairly straight forward, and while I do think
the benefit of using builtin types vs using the macros is nice, I don't
see that as a strong enough reason to hold up supporting the older compiler.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

>  drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> index 323c57f03c93..c02c035b81c0 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> @@ -830,8 +830,8 @@ static const struct dwxgmac3_error_desc dwxgmac3_dma_errors[32]= {
>  	{ false, "UNKNOWN", "Unknown Error" }, /* 31 */
>  };
>  
> -static const char * const dpp_rx_err = "Read Rx Descriptor Parity checker Error";
> -static const char * const dpp_tx_err = "Read Tx Descriptor Parity checker Error";
> +#define dpp_rx_err "Read Rx Descriptor Parity checker Error"
> +#define dpp_tx_err "Read Tx Descriptor Parity checker Error"
>  static const struct dwxgmac3_error_desc dwxgmac3_dma_dpp_errors[32] = {
>  	{ true, "TDPES0", dpp_tx_err },
>  	{ true, "TDPES1", dpp_tx_err },
> 
> base-commit: 841c35169323cd833294798e58b9bf63fa4fa1de

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ