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: 199878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp648dyb; Mon, 12 Feb 2024 07:47:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWrJOrQq+TXMyJnJLtvInh2c45NoAcEnr+OFrnwYvB+WapLh/mRArqnWU0I7wD3deOhkatUv9vj7MYM6+6XsFAUHSDLIg== X-Google-Smtp-Source: AGHT+IG8lW4hY6hrfqdaOieqZRpUvpnKjg3tsPbUagosKItM/bg9pEae6mSuujKIuznqtdDMGZ47 X-Received: by 2002:a17:90a:c16:b0:296:a43f:66f4 with SMTP id 22-20020a17090a0c1600b00296a43f66f4mr4078907pjs.39.1707752855940; Mon, 12 Feb 2024 07:47:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707752855; cv=pass; d=google.com; s=arc-20160816; b=R0SCIVbcKpGtD7BoYeINTcyeFfZlVQKSJZapu57oEkZ/DpIINzaETmxND4doifdCfD D096B1d0Ws6QggkM+aVVq6UixBbZvks1KYq+jH5oTAOkfQFBZtNBGCu3Us0Lb25+/bX4 K1j2bTpIl2udftQ52twsf6m9zRrt6buT0JvoQ/WZvFtH/6sN3j3OX+ZXypnDOllaaCT6 ZxOflhRcoQIwRt4T7Q2rkHbFv/eMIztNrpQKhuaKBmBWjxhT0QIVvm5GyefXmXzhhgcJ 6sHYiyEBhALIF/rlwld2cDW/c3C2uuc/PySV8a83tQCRK9lzwPBzNdyYgxgunDU2czdD ljoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=b2WvOPlkB9yAKGzhfCMaebTic8EKXRGwqnd7H1DqsdU=; fh=2zoRcYbjQ0M6itiUpUhHCLOx+4i4PsOzvACS09D68D0=; b=HEkwd3bxqb5E2dEfs1S1/rOn+iVBSGkJT9qsb2+l5S3gM1yNpPQIlCZTTfk86MaPW+ AImNt+iq0WJO7/uPHDAXrwY1lBhP9b4W4twm9vmZ23quN6PcU01kPlKUN3Z8/j/bQGAO GCf3K0j5CrhQenDsb7lIDS+SZnPN85xYHMj18efY9j68WRKtKyGex68Ugtxk7jCzE5Fi m/cJtrTtWPQTYApKtMpC9OAxGLO0dMgS6iJ9RQI9xvSDX3702QalRUWNa2ag7G3PU5CA WtSBE75rvFxPdlcihtqfVHUdTIDxpW466VSKvAu3SOmBYmdAiBWnN5j45l8hmlq6WRIm N2yQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=gS7lHoVJ; arc=pass (i=1 spf=pass spfdomain=posteo.net dkim=pass dkdomain=posteo.net dmarc=pass fromdomain=posteo.net); spf=pass (google.com: domain of linux-kernel+bounces-61915-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net X-Forwarded-Encrypted: i=2; AJvYcCV6ITrc7NgsOC7vKiCdq9T5AEIeHIy4Jzxh23NcoRc2tASOqtJHL4QLIDkYpJ6cn83abJebp5LfpCKkcDDP/MU2YefGtg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id ph15-20020a17090b3bcf00b002964f6f750fsi438645pjb.153.2024.02.12.07.47.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61915-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=gS7lHoVJ; arc=pass (i=1 spf=pass spfdomain=posteo.net dkim=pass dkdomain=posteo.net dmarc=pass fromdomain=posteo.net); spf=pass (google.com: domain of linux-kernel+bounces-61915-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 76E5FB20EF1 for ; Mon, 12 Feb 2024 15:44:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0ADDF3D0C8; Mon, 12 Feb 2024 15:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="gS7lHoVJ" Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84B863CF49 for ; Mon, 12 Feb 2024 15:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.66 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707752639; cv=none; b=Az2B+pxLn1JmdwW9BIYpPiok4YI7tk1VQh+vp3Bomoe2KrrEqDI3mhFiC2LFKc11amxCMGeQ41ccAh2WK75h8D0pDxs+3V+AhTUoCppiT5QZackMi2BWnfhyjH2L/EiNNFJBFDUIp47rHqYGNpKLA7AosQLypCEUIFpfHpSkPJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707752639; c=relaxed/simple; bh=cvVTOC2X+05hH/d+YZ7aGeqiZdF4zt9gjMio55/9LC4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=lWJXgiJuiES/9xCqvxjqakoX86KCloeWqDDR7mL1b1cxNqP77OXP6Xcp8k7XNv1WlvgDr5yz9t2vpboFwHbsGQ0idnx/0TpdH+dd1CzBuDiowlsDV8UJFpGIrMa7pPpMLrXiPD1V6DPQZlX9Ro3/scTLX7kSpQqytJEz1qtn0Hc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net; spf=pass smtp.mailfrom=posteo.net; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b=gS7lHoVJ; arc=none smtp.client-ip=185.67.36.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0CC21240106 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790708658327472943 X-GMAIL-MSGID: 1790708658327472943 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 },