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 C091FA0553 for ; Sat, 11 Jun 2022 17:35:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9ECB40150; Sat, 11 Jun 2022 17:35:43 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 563FC40150 for ; Sat, 11 Jun 2022 17:35:42 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id e24so1946257pjt.0 for ; Sat, 11 Jun 2022 08:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5pnBh8HFSKfHo/7LMwEbZrEEUHR9x3lUL3Ti+t0w4Ro=; b=CQIC8yVhjyR0K4A94ZF8zupKHfVmJX3mpb7E5U+aTKuyt2B67o4CIuBF73nHcNEB5K SdBRhHuv3wwUXCBXv5F5YZCI+Hz/iV+r2kmilpYwILLXzEKszGhba/E1j4koo19GyZvY Szl6PrmVtz5EvqORWkeSSDK7ABTrcj/pZL6V5VZfGGjQBEflGReIKUtVvjPw3mu8cuuw du7DJp038Wr8pMhPIKVlT84cU1MCP9JhrSoUki/u5AzgrjviTm5fDL1h8sAYP+/Y5rJn h+8mf1l9PeWYLpb5O/54Ch40RM0yb0XpVM8gmDGZO73mw6F1TS/+906j8WE9PgcGpnvN n1bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5pnBh8HFSKfHo/7LMwEbZrEEUHR9x3lUL3Ti+t0w4Ro=; b=JBKx9iDhgQi9TO8RNd1ysqsKRd/b9ygxmOPrjPyX2aDpju3iOmefVt4W1Iu+EJEOsM yNJD5M7DdsAOt8lYDJ003PkWZJDX00NpFVCPt/sfX7/KpfDm5/TsRwVqtitVynY0OILs ZUqB/pusgSHt5Edv4Gvy3+xeu6z2VB3Hsng8KpBGjs27+fuKqVfFY2uFFNmS3w2x0WH9 VximTzP3hAt3o6uWlbiv6SMGBh0AtT/a4zXGVl3B131OBT+L2lIYPrqgy7LoY3SVm41z tPBPDGwOVzLG7Ik6ttz4U/Iaxvbg9WHJiwMdHgsOykX4cf4R+jY59DYB/lrhWB/wFoAm qWCw== X-Gm-Message-State: AOAM532IsAS6JL9w8V/4c08UFBu5+WJ1dkk+BDou7GyuqaYeePt08j4l Fl2gFOYq6pATld4pv37G6qVH0w== X-Google-Smtp-Source: ABdhPJxLSAhMj9XVMSNuew+/SITqcR7XncJ1+emfsyktZ2wLq1+dzvN3i63kOj3ON7qxOJioArTgBA== X-Received: by 2002:a17:90a:5c84:b0:1dc:9b42:f2cf with SMTP id r4-20020a17090a5c8400b001dc9b42f2cfmr5661232pji.123.1654961741586; Sat, 11 Jun 2022 08:35:41 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id v8-20020a63b648000000b003f27f91135asm1789741pgt.76.2022.06.11.08.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 08:35:41 -0700 (PDT) Date: Sat, 11 Jun 2022 08:35:38 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Apeksha Gupta , Sachin Saxena Subject: Re: [PATCH 05/12] net/enetfec: fix build with GCC 12 Message-ID: <20220611083538.7b63e3d2@hermes.local> In-Reply-To: <20220518101657.1230416-6-david.marchand@redhat.com> References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-6-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Wed, 18 May 2022 12:16:50 +0200 David Marchand wrote: > GCC 12 raises the following warning: >=20 > ../drivers/net/enetfec/enet_ethdev.c: In function > =E2=80=98enetfec_rx_queue_setup=E2=80=99: > ../drivers/net/enetfec/enet_ethdev.c:473:9: error: array > subscript 1 is > above array bounds of =E2=80=98uint32_t[1]=E2=80=99 {aka =E2=80=98uns= igned int[1]=E2=80=99} > [-Werror=3Darray-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 > =E2=80=98bd_addr_p_r=E2=80=99 > 113 | uint32_t bd_addr_p_r[ENETFEC_MAX_Q]; > | ^~~~~~~~~~~ >=20 > This driver properly announces that it only supports 1 rxq. > Silence this warning by adding an explicit check on the queue id. >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: David Marchand Acked-by: Stephen Hemminger