From patchwork Mon Feb 12 15:43:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark O'Donovan X-Patchwork-Id: 13553426 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F373EC4829B for ; Mon, 12 Feb 2024 15:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3fovopWCf4do+iEziHDRri/Nm6qRG7i9hJCinh8ehEc=; b=enNBM5q01uNtdH 81X1FLGqwZ56BjWHeY0kZg8rhHCMwPYDtV6ZtOeA3Hdaf+tvt6OUt1zKv0skhq85JAYj93S8wCvPz WlpxZP0pnzlBtNcFK5+maIxFQSZVglRaSivFYCD5qr7UTimytJOWd9qs7LnGqSBEclUXu33w6+YjG Wxyhgm6h5xRpUoTt+LpUbcRh0TBmhcBwqgiurDyHuzUSoo56bw9uanUTnz2fKDIh/R4FhZIL4+XWt UUl7/jf8J9H9VCWqoIBnIT48GnI60yhsi7OwwajmCr+HEmZaOUC6c1N8cgaezvpMqMN7oAXFZjO1z /e8hmMToz5A3ozgAQqMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZYTS-000000060k5-3HdO; Mon, 12 Feb 2024 15:44:02 +0000 Received: from mout02.posteo.de ([185.67.36.66]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZYTP-000000060hD-0Gve for linux-arm-kernel@lists.infradead.org; Mon, 12 Feb 2024 15:44:01 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 36462240103 for ; Mon, 12 Feb 2024 16:43:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707752635; bh=cvVTOC2X+05hH/d+YZ7aGeqiZdF4zt9gjMio55/9LC4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version: Content-Transfer-Encoding:From; b=gS7lHoVJUa0+Vm69TgFx8bQbHOMKrApMNLk50nRR5YKcltNl9p2WPpkRzIZBLSmgy TcPH++Wrv2nXZ05XQJGb/1mLvdTFTp3jXsPHtXtvmYYFirOILan5cOIjBNF7iRHWNY NdK4aCwNusOr+zjBR1X/x4IHHgJ9MISW84+OyT+mwB+u2o83lqbf4A+h5WWRhlRgI3 sFW/NFlD13d7e7TEmnBpclZI/oVOcHvnUkvptcRsr0iILO8U4eVQUmeP04l3r6XFQ/ VXtO+Psw3XN3H31Sp3IvNLmThZY/FiQoIu4/lkfJAHnuh3AkIzrZhfiTRZ3NZof0Ng 55go2bntVoIqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TYTJl4Z3Dz6txm; Mon, 12 Feb 2024 16:43:51 +0100 (CET) From: Mark O'Donovan To: linux-kernel@vger.kernel.org Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Mark O'Donovan Subject: [PATCH] net: stmmac: xgmac: fix initializer element is not constant error Date: Mon, 12 Feb 2024 15:43:19 +0000 Message-Id: <20240212154319.907447-1-shiftee@posteo.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_074359_276490_BE685CFA X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Jacob Keller --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 841c35169323cd833294798e58b9bf63fa4fa1de 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 },