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 E4BBAA0553; 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 DA8B9410E5; 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 599234069C for ; Sat, 11 Jun 2022 17:35:42 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id g16-20020a17090a7d1000b001ea9f820449so245683pjl.5 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=jIfWhN8bcC3SLnTy61trJfZseziawXZbyYtp1cFNp/tB2sxbrqipmtqcCzdTtqG/iz EdBeo6AvK7eT3Z9zyQXHX3U+3ftoXz0y0rtjN1C3DLqzsersOc7MHvEWjgRhaDSHKdOY VUuXjw7fTlqrVPec6wyrP2xRhPQOdfqoD80y13oO8tmS68NwjCvbEcCFkXSbhzfs6mrI AzIZtwGgzEMpgvIDtgPoI7CVIM66RE3WRHLi93XTIhIIcrcir+6J8OCFdKjzcH6sn6jK 3asYIMXKCfIRZ4fUX9T7bGn6yPheUQzDwMqmLfS1qNieuhcMtrq6rI/iWTcIR4XuauaE SXPQ== X-Gm-Message-State: AOAM53272DFCaxEbs5lwVwa9pB9+Lc7NS+lPvP7t2FCu2Q29nna8hS/G F25X50lVJsWnY1f5HbrBdNBl8w== 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: 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 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