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 70047A0553; Fri, 10 Jun 2022 15:08:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60C2740A80; Fri, 10 Jun 2022 15:08:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F008F427F6 for ; Fri, 10 Jun 2022 15:08:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654866526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c+7xlLc70jqs6wnm2XRTzgreR0oYcSaWNBAfGaWtQ/g=; b=XGirjLJ8Za+nAI30q7GcPuELsrpt0un9usTIaFmCCND2Ao5sZkmx/YYrvYRAIDbWB8xq/Y eSYNRFjBQ/FGM4cnekjwEgCJCL/nm9ari0ahmhG6a37gVtZ0ApqGZnPbLhovQCTvqVfopm 8GbrN7fR4jQWC2W2NQ8uU7srOk+FLoA= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-126-7xnyUqyLOJSb-OqiImrkNg-1; Fri, 10 Jun 2022 09:08:43 -0400 X-MC-Unique: 7xnyUqyLOJSb-OqiImrkNg-1 Received: by mail-lf1-f70.google.com with SMTP id u5-20020a056512128500b00479784f526cso4192521lfs.13 for ; Fri, 10 Jun 2022 06:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=c+7xlLc70jqs6wnm2XRTzgreR0oYcSaWNBAfGaWtQ/g=; b=POxgz49YWDZH/MbKt3NwN4KCtDfJtH2CNcU3o3QfmBrgWouLLL44TMra5uBqsatxpE E9WJfswCario2wR+pvWfbrUbKVNZGNlFYS8mCd+8/z0zG94KPSGlgwC0EU6lCb/8ctsQ FbpYOxn64fof62+D0KY60IT95c63ggYFwI4MRzQIUIN8lEt9PXdvEE7cd6ux1jpwgx8j PkMtzWzUifx9WXk1JLA9YRVQqbxSUdWg9SpteN19emJP//+UTle8uQtf7O0MetV2SVBd JPWvJmqd8BnksbVP/3rr3VVP4T412sdmKIUT6AZjSJD++FsY/9c9+hs9i6x0hcyDw0lE ro2Q== X-Gm-Message-State: AOAM530Ow+E0xN75xKMvdwDZ5hOedVWDW3Khd2sa5ncFUTcV96fKF3Py 8R0IhkUb1llz7MxDaaC/IqfsdRRKiBCuRudQWqLU567KsXMnFEtupkaTi8hrVLH3OOe/G6tJQrO hfQnwy3+9y5HvwUaBHGI= X-Received: by 2002:a19:a418:0:b0:478:fda4:e755 with SMTP id q24-20020a19a418000000b00478fda4e755mr27503395lfc.560.1654866521828; Fri, 10 Jun 2022 06:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsEPpBS7MJswQBof7K9csZj0WspeLQu3egAeSPdO6RS3acfRsZdciXLkh0UhxsJj3W98SYwiqgvNp8x43JL40= X-Received: by 2002:a19:a418:0:b0:478:fda4:e755 with SMTP id q24-20020a19a418000000b00478fda4e755mr27503381lfc.560.1654866521637; Fri, 10 Jun 2022 06:08:41 -0700 (PDT) MIME-Version: 1.0 References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-6-david.marchand@redhat.com> In-Reply-To: <20220518101657.1230416-6-david.marchand@redhat.com> From: David Marchand Date: Fri, 10 Jun 2022 15:08:25 +0200 Message-ID: Subject: Re: [PATCH 05/12] net/enetfec: fix build with GCC 12 To: Apeksha Gupta , Sachin Saxena Cc: Thomas Monjalon , Ferruh Yigit , dpdk stable , dev Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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, May 18, 2022 at 12:17 PM David Marchand wrote: > > GCC 12 raises the following warning: > > ../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]; > | ^~~~~~~~~~~ > > 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. --=20 David Marchand