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 7B938A0543 for ; Wed, 24 Aug 2022 16:03:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 664774114B; Wed, 24 Aug 2022 16:03:54 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 84DDA41144; Wed, 24 Aug 2022 16:03:52 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27O97YvQ022004; Wed, 24 Aug 2022 07:03:51 -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=fLir5hhgZgcKaJEveWFc3PCIyl5V0avMZ5BK4TrIwcgyxBIXlldtuFrB4nrbedf8Izcm VAOmhL6WWvKX8Jhz70QWXxLvC0RCiKWXO6TJk8P4IsbXfCpkVpFGhuTHdXyNu+3g1Jn5 Bf9wlxxh2fxBce4pBd3b9xdEX8HQoQWE0gSVlVQyCtEWO3cnji+ehLbSMwowB9J4YSOZ HMIeDxa1WcHIfo9+f6lWH5YD83AETO6pxci+EyixWb7rUzMztHBSTo27FFKM7OmWBC6I VEBNYQw4R7buhvqg7BPQqxKsF0jhlywiKUqbh7jyb3DL6pcfk56rHFbcebGCRN8LVjux yw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3j4x5h5m00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 24 Aug 2022 07:03:51 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 24 Aug 2022 07:03:50 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 24 Aug 2022 07:03:50 -0700 Received: from localhost.localdomain (unknown [10.28.36.157]) by maili.marvell.com (Postfix) with ESMTP id 098493F703F; Wed, 24 Aug 2022 07:03:47 -0700 (PDT) From: Amit Prakash Shukla To: Rasesh Mody , Devendra Singh Rawat CC: , , , "Amit Prakash Shukla" Subject: [PATCH 2/2] net/qede/base: compilation fix for GCC-12 Date: Wed, 24 Aug 2022 19:33:39 +0530 Message-ID: <20220824140339.2581716-2-amitprakashs@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220824140339.2581716-1-amitprakashs@marvell.com> References: <20220823105742.2276506-1-amitprakashs@marvell.com> <20220824140339.2581716-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: n1ypZ3wWDzJiHbaYlr1OfUf6mdkQun3h X-Proofpoint-GUID: n1ypZ3wWDzJiHbaYlr1OfUf6mdkQun3h 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-24_07,2022-08-22_02,2022-06-22_01 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 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