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 41D35A0553 for ; Fri, 10 Jun 2022 15:08:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3953B40689; Fri, 10 Jun 2022 15:08:46 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C0A6740689 for ; Fri, 10 Jun 2022 15:08:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654866524; 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=HYtTd7e3JUmAj5h4yeoB85+F4diq9Tg3F8pBU4iO3NmB5OYB5J9IxkKDRi4VcDMMQAPUzR VEe+VTxHVxpHq3AJG2rs/jJTmLaJWCJk8sSxCzl9NxPa62uQ7WnLJTBvoNHp/foTMbtywY esIEqRB/NQXlm99PeRAvdjIse2a3jak= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-345-MhVt-AS5NHuss3_hOEgxnQ-1; Fri, 10 Jun 2022 09:08:43 -0400 X-MC-Unique: MhVt-AS5NHuss3_hOEgxnQ-1 Received: by mail-lj1-f197.google.com with SMTP id t23-20020a2e7817000000b002555d1188bdso5173598ljc.4 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=qFcld1vT+MAsWy5hjw/Q9jxaRyh1fFADRsponw4edSEPgs9hp5UqbRPhTfZpqKodBB FpQeZAIGR9zf8bh3ciW2i5uWThLBwvqiajcnsFtDaua3Aa2RdgwekxqfIAr+6ccP1xK3 wZepw3L7AMORgUdQEw6wK2fKw4LKhqjzbVp4zYyHrq4rHa9+mpfJ9pcZFrUVMOGisBfP PlxHSPQ9lxLRxf/WnNvs3zvWr+HXcnk96ri+KL5WIysLYZ+5zPwiYJ6xh0cwO5bqBN01 DFI+Jb3TO4bYuxMdgBt6YV6El2XulldlXNgq/9o6tJOt1vw/4Do2+A8tMtCfvoOof0b7 jNQw== X-Gm-Message-State: AOAM530y/iSq8JfW92vJLVlLrJAmrDPAUSfsbh5QWyGoW6ucvXXOq9Jw IIkcdAwgLCp3bfxGCh9bVLwRRXMjsegTeoo8GeZkUPoVR+/HkgDqBCcUx0ooSXxR+GZ9bIrZQfX K1Y1JOxzhhhmWI8gvrXZcJtc= X-Received: by 2002:a19:a418:0:b0:478:fda4:e755 with SMTP id q24-20020a19a418000000b00478fda4e755mr27503391lfc.560.1654866521827; 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: 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, 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