From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CB4FA0544 for ; Tue, 4 Oct 2022 13:18:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66B28427F5; Tue, 4 Oct 2022 13:18:29 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id B14DE40DDC; Tue, 4 Oct 2022 13:18:27 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5C2935C00F4; Tue, 4 Oct 2022 07:18:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 04 Oct 2022 07:18:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1664882307; x=1664968707; bh=Y0xRteHuCW bUPLXYtoozH1z9MsuKCa6xO3hloOh01NI=; b=TcP5V0NISIFuonAIs0sYIYVkOF WiFh67mPx5KpjXWKOJzbayS0nOMsRdCY08ShEMQ8yDPP06kg0VcKELPg5wg5jkgz +TjbHfUXv5K8fenK9hnNstVU0tpb8iZKXlsMCA3/Jni5Bkq0LeCQf57kpBCImbBe 4+dnmKV1TQlvYdMsbtXhSQF6Wu9Osz1LZSORz6WZwo3eEqm0ux9bDkzZacXlEB/l KbOz1rJJ/7lwAu5rbLAaoLL+XiNRxtoJosSthntpwJy6WowB2COxt3HzlEXbJ2Nw fwmKACpz+VeFajU580ZyT+ylDuJsZLbg+nm2D+WfrojqP/QQ8f0guKUcY2/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1664882307; x=1664968707; bh=Y0xRteHuCWbUP LXYtoozH1z9MsuKCa6xO3hloOh01NI=; b=j+8wR9cyRzr18lpqpZLoxwD2pZwdY s0BCRxzfJ/lt2NfpQSalkjTijhrQYO7+4jh5UF6s3J2lJIdUxIYUc3gBWhF4j/RS KcVy9VXoRGFwoKg9Dq8wrEDlFSXX4PjIiF/Rkia7PdfezdI/fyAkttIgJQvXkax0 JKG8pV7s96No28DHvTKrovalqnevS5sl0e1YQCRbG/ME8Z4JwxK1WmQWqN+W/c0I o3moaHPsVgrchNohcuB2esWsrPND8MJSIUT/tqTYEsypEz25UuWaAMJlkx+dlyhd tSfiRuvSsyqJ0ifKNb0fGQtwMHrYfwbdiR/4RqJCvKuXqYqbwdMHjW3qg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeiuddgfeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhephfduueeffedvjeevhfekgeehleevjedvffdufeekudelfeehkeel heeiheffiedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Oct 2022 07:18:26 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: stable@dpdk.org, Rasesh Mody , Devendra Singh Rawat Subject: [PATCH] net/qede/base: fix 32-bit build with GCC 12 Date: Tue, 4 Oct 2022 13:18:10 +0200 Message-Id: <20221004111811.1502920-1-thomas@monjalon.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org A pointer is passed to a macro and it seems mistakenly referenced. This issue is seen only when compiling with GCC 12 for 32-bit: drivers/net/qede/base/ecore_init_fw_funcs.c:1418:25: error: array subscript 1 is outside array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds] 1418 | ecore_wr(dev, ptt, ((addr) + (4 * i)), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1419 | ((u32 *)&(arr))[i]); \ | ~~~~~~~~~~~~~~~~~~~ drivers/net/qede/base/ecore_init_fw_funcs.c:1465:17: note: in expansion of macro ‘ARR_REG_WR’ 1465 | ARR_REG_WR(p_hwfn, p_ptt, addr, pData, len_in_dwords); | ^~~~~~~~~~ drivers/net/qede/base/ecore_init_fw_funcs.c:1439:35: note: at offset 4 into object ‘pData’ of size 4 1439 | u32 *pData, | ~~~~~^~~~~ Fixes: 3b307c55f2ac ("net/qede/base: update FW to 8.40.25.0") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- drivers/net/qede/base/ecore_init_fw_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/qede/base/ecore_init_fw_funcs.c b/drivers/net/qede/base/ecore_init_fw_funcs.c index 6a52f32cc9..0aa7f85567 100644 --- a/drivers/net/qede/base/ecore_init_fw_funcs.c +++ b/drivers/net/qede/base/ecore_init_fw_funcs.c @@ -1416,7 +1416,7 @@ void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn, u32 i; \ for (i = 0; i < (arr_size); i++) \ ecore_wr(dev, ptt, ((addr) + (4 * i)), \ - ((u32 *)&(arr))[i]); \ + ((u32 *)arr)[i]); \ } while (0) #ifndef DWORDS_TO_BYTES -- 2.36.1