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 58615A0093; Tue, 23 Aug 2022 12:58:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BB58427F1; Tue, 23 Aug 2022 12:58:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B0E74410DD; Tue, 23 Aug 2022 12:58:12 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NAI9Ef008729; Tue, 23 Aug 2022 03:58:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=4spMDAA0NciYjitWukMDTfWo4co/mzB97oyvGRTWVL0=; b=FaI36vJ58ftzSo236UDH3mkeKZS3FxBRUm7D3/fdh0X+owBZ0dLWaIQtSEAiSEmFs8qm WtwngmAeVyyT0I/r1iSx1KBmjCmZM0dhkFcMynsuav6nQXb+XnbN0HHDJKygQE3rIQMn uhG6bqDUpXKucwD4cki9hRJ0uVgMe4i8rRs4r9cGvrtEMxf7sD0Ua/WgzjNyFOrfDWbs 5v/BcLFNOZzKZQ4alJGz4ICK/UTn9lFVpkGZX8TNwFd1v1DWmI1KQfjNgUFLHDx+K6Qf lqqjV4bg7mRd60e8EVGJdMi05NTVvb6ehXauYE+b4UtfNi/9VHjPhf2uFUAswkwv1atS Gg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3j2y4k32ur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 03:58:12 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 23 Aug 2022 03:58:09 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 23 Aug 2022 03:58:09 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id E431C5B692A; Tue, 23 Aug 2022 03:58:07 -0700 (PDT) From: Amit Prakash Shukla To: Rasesh Mody , Devendra Singh Rawat CC: , , Amit Prakash Shukla , Subject: [PATCH 2/3] net/qede/base: compilation fix for GCC-12 Date: Tue, 23 Aug 2022 16:27:41 +0530 Message-ID: <20220823105742.2276506-2-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220823105742.2276506-1-amitprakashs@marvell.com> References: <20220823105742.2276506-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: v2OBc8FMcWi97oFcufeB8cjI2HHwQNPP X-Proofpoint-ORIG-GUID: v2OBc8FMcWi97oFcufeB8cjI2HHwQNPP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_04,2022-08-22_02,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org GCC 12 raises the following warning: ../drivers/net/qede/base/ecore_init_fw_funcs.c: In function 'ecore_dmae_to_grc.constprop.isra': ../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, | ~~~~~^~~~~ cc1: all warnings being treated as errors Fixes: 3b307c55f2ac (net/qede/base: update FW to 8.40.25.0) Cc: stable@dpdk.org Signed-off-by: Amit Prakash Shukla --- 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..4e4d1dc374 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.25.1