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 6A4E9A00BE; Tue, 14 Jun 2022 10:17:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F2714068E; Tue, 14 Jun 2022 10:17:20 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60048.outbound.protection.outlook.com [40.107.6.48]) by mails.dpdk.org (Postfix) with ESMTP id A525C4067C; Tue, 14 Jun 2022 10:17:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ki/lfq2YGCH47zeubE35Ku7YC9U2ewOZydFPdiO7Knctj7cJkYad9sDpHKyt899tymwM/xbdPClhI8WWtjDYkVPq60q8DCRyPjXK+klcj+za3z9A7WMmlOIHG88/LlVpKHHZDgYYqX2WwEc4rIXDew7dST8yNJ312319qrocmdV6CY7vTJpbVXXwXlTQaPKruI3KnaPRX2MAeVvvQUerzcgkBiWZWcNlIgb36JhP5mMz3TZjc2TqIUOKnO7/J0IB1C8mQrQewl8lj47sHLhq4Rvb9AFp8jsqoMHN8vfV8YC9RnjG3M1M9YNkOvgPFy9rRr7P5h0OsWgsmdLTAGNGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iVRbSnvvQqKH/gADvM0SWMGlIMx+Qkirw2Q6mp1zDWU=; b=TPWFedlGdu3OtMTFII35chKrjsC59DkhpFUiaSdJ5wG/NavGlwaiHz2RqSd+A3ZpjyKqWkziKuNZoODeoRhvQu5Y6i2N7sFfMKQvbJZUPZJiGgG8ld/I7z34SlcE739gJxao8eg1mf4wTiswHbNLabrMfImIynH/HR0qEPiqkOKFdTWcyCPQAUn12S/ExkSU0JRwufqFaVG8IbeJJFpVShkCqw6j+bYPgGV331EyZW97C9YqcxEcKviuwRjCGrFindTN/YfvaXxcfvcxxIJ2jD6e+ePjfFNg8Q1qvcMfRnHQfVIETqikPI+gYJ1SNKRPmPWz4wYod7hobv6VbgDA9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iVRbSnvvQqKH/gADvM0SWMGlIMx+Qkirw2Q6mp1zDWU=; b=XU3uv04WWc5rpNZPkAE8nvNWzkg11cLrbdwE/mc789AALhgNI7AOyR9vo0WZz954IT8RyX+JG5bVodRgtGS7LSbNPmkJ0DA4xEj4+CCFWw8PSm5twC/FiP/XPspyvAY0Lw8Qas7BPQ23WIMXlNL6hThWdGcR7I2og8jYXNU88PI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS8PR04MB8562.eurprd04.prod.outlook.com (2603:10a6:20b:421::9) by AS8PR04MB8547.eurprd04.prod.outlook.com (2603:10a6:20b:422::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.22; Tue, 14 Jun 2022 08:17:17 +0000 Received: from AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1027:97db:e59d:6275]) by AS8PR04MB8562.eurprd04.prod.outlook.com ([fe80::1027:97db:e59d:6275%5]) with mapi id 15.20.5332.020; Tue, 14 Jun 2022 08:17:16 +0000 Subject: Re: [PATCH 05/12] net/enetfec: fix build with GCC 12 To: David Marchand , Apeksha Gupta , Sachin Saxena Cc: Thomas Monjalon , Ferruh Yigit , dpdk stable , dev References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-6-david.marchand@redhat.com> From: "Sachin Saxena (OSS)" Message-ID: Date: Tue, 14 Jun 2022 13:46:59 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 In-Reply-To: Content-Type: multipart/alternative; boundary="------------DB44937AF8CD3D869F90432B" Content-Language: en-US X-ClientProxiedBy: SI2PR02CA0013.apcprd02.prod.outlook.com (2603:1096:4:194::21) To AS8PR04MB8562.eurprd04.prod.outlook.com (2603:10a6:20b:421::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81be6e5c-7edc-4730-0f91-08da4dde4aae X-MS-TrafficTypeDiagnostic: AS8PR04MB8547:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Gf+L//cxM78p6RuGxLAuKn8XqUcg8WXDCjAs4xW7tDMyFM/vbimzLTfIASfaSuybDGM0zGQLlfEcN8P6oFx42tgpPPMFudMhibfCW/qq84WZDq9qjpXqw2xGtP1jez0QyviFqOdIlknn/UZfOgrsYPtN3PIs+j4y3r7z1QdrYTMy/qrKB7/paYfE8MjWZJk7sSWbiToJaDT/VWUxxT/ntwOO9pjpnbLjSb/OLGktzeKLd22DRNwNHWXzYeENo6ri078Uo3OIwRy2g+yNxiF+CyriSRpeHYo+hZdGqCsB9f2D91ZsgUhF/B4tb+qYxD3o+NgsuiCRU94QgzeyK7bli6YtF6boWVSgmdApvcQdzm6nnF8qKs4GPoBrqVYajnpc7KLa3CQ2JApM1seLnSF8+rcxWDESAWRPv34WaXGBwg4yTMIkyuWk90fOvZaGT93MAoZqFykRtLej9uyE0yf3EVpliHHABxpqCFapmuRK7wEDUG72orSIpsoR5lfDkQPhTlbjbF3GbLwuHwJs5x16v1LzfRC9NFMLnrVHxEgsS5Y4FRW6FRFFP3UZAfHuMmaW8sr7VxAHsXJi3OGLJkR0Z5LXYRmDSfqCnkf+57Cnjd11lS+PCxuQvpcJ0cAYuQW8lu0e+5DV8dtFmW5s797n0SiW1Ni1NfDOe/jljWsX7rTGlLHRd4DHVQadDXX+YvKOy0peRRmoO7NdCmqsAVOR3QqTM0Zu8GiC23L2QyDfbkW1a8zi8slfWDnl6NpqvDZyb+U+cgjgwGuMAjcg+CJQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8562.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(6512007)(38100700002)(38350700002)(26005)(54906003)(83380400001)(55236004)(86362001)(31696002)(186003)(2616005)(6506007)(8936002)(53546011)(316002)(66946007)(66476007)(31686004)(4326008)(66556008)(8676002)(2906002)(6666004)(5660300002)(6486002)(33964004)(508600001)(110136005)(52116002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WmRSZ2lxNU80LzZiZ3J5d1pUbm5wYkh1QlcvOHR1MlpvOVAvRVluVmdTV1N1?= =?utf-8?B?amJyUUtFRTAxSFBCU3hJd0Z0VEVkQUxMdGM4dm1YQkp3VzNMZ29URnJINUJq?= =?utf-8?B?dHhYRlBqVUM4Vjdnak1pNzBHamhMdHdBTTZXTWRseXVmditHZ0UvYjdZdTdW?= =?utf-8?B?Qm9PMDdmSDRONmE2SlBWQXBxYXpjQnR5MjNlcUtGM3dRRXpRNlFnOXFQWkN3?= =?utf-8?B?V0F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MR3NMbjJ1em5sRktwMElHTGhz?= =?utf-8?B?M3drUDEvUGw4bThGNE9rdTlRNUkrRWxEeC9uRmlOWGhmK0JjV1hscFZFMHVK?= =?utf-8?B?dXl5ZjArQ2JzQVJOSEZnNi9ncDExTEw2b3czd1d4M3J2U0k4TVQyNEsrZWdi?= =?utf-8?B?NmdCNUsvVWtiNjFVUlg3b2dWWFRZaDRTTWt5WitTWWZqU3RiRkJhb09YUWp1?= =?utf-8?B?c3lubWpYalJrcjhudEkwLzYrRjBicG5WVVYzNTEwNURDM29KcXYxRytudm5E?= =?utf-8?B?dnhWNGxVOXVjRWNNWXVyWjRueGEvSGV0STl2bmw5RW5QWkpLeGtmRU5TNVY2?= =?utf-8?Q?k8eOIdMMRMzIgfKQ=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81be6e5c-7edc-4730-0f91-08da4dde4aae X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8562.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2022 08:17:16.9052 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0CiefqH6mNGnrRydsDnFUwFNjP31lTlwZ4eSSjTKyutf1Vyn2WWgCXxWAnMeo7U6Lb+lvRhP2QS//5U3OYRlsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8547 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 --------------DB44937AF8CD3D869F90432B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Acked-by: Sachin Saxena On 6/10/2022 6:38 PM, David Marchand wrote: > On Wed, May 18, 2022 at 12:17 PM David Marchand > wrote: >> GCC 12 raises the following warning: >> >> ../drivers/net/enetfec/enet_ethdev.c: In function >> ‘enetfec_rx_queue_setup’: >> ../drivers/net/enetfec/enet_ethdev.c:473:9: error: array >> subscript 1 is >> above array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} >> [-Werror=array-bounds] >> 473 | rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]), >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> 474 | (uint8_t *)fep->hw_baseaddr_v + ENETFEC_RD_START(queue_idx)); >> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> In file included from ../drivers/net/enetfec/enet_ethdev.c:9: >> ../drivers/net/enetfec/enet_ethdev.h:113:33: note: while referencing >> ‘bd_addr_p_r’ >> 113 | uint32_t bd_addr_p_r[ENETFEC_MAX_Q]; >> | ^~~~~~~~~~~ >> >> This driver properly announces that it only supports 1 rxq. >> Silence this warning by adding an explicit check on the queue id. >> >> Cc: stable@dpdk.org >> >> Signed-off-by: David Marchand > Any comment from driver maintainers? > Thanks. > > --------------DB44937AF8CD3D869F90432B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Acked-by: Sachin Saxena <sachin.saxena@nxp.com>

On 6/10/2022 6:38 PM, David Marchand wrote:
On Wed, May 18, 2022 at 12:17 PM David Marchand
<david.marchand@redhat.com> wrote:
GCC 12 raises the following warning:

../drivers/net/enetfec/enet_ethdev.c: In function
        ‘enetfec_rx_queue_setup’:
../drivers/net/enetfec/enet_ethdev.c:473:9: error: array
        subscript 1 is
    above array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’}
        [-Werror=array-bounds]
  473 | rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]),
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  474 |     (uint8_t *)fep->hw_baseaddr_v + ENETFEC_RD_START(queue_idx));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/enetfec/enet_ethdev.c:9:
../drivers/net/enetfec/enet_ethdev.h:113:33: note: while referencing
        ‘bd_addr_p_r’
  113 | uint32_t                bd_addr_p_r[ENETFEC_MAX_Q];
      |                                 ^~~~~~~~~~~

This driver properly announces that it only supports 1 rxq.
Silence this warning by adding an explicit check on the queue id.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Any comment from driver maintainers?
Thanks.



--------------DB44937AF8CD3D869F90432B--