<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font size="-1">Acked-by: Sachin Saxena
      <a class="moz-txt-link-rfc2396E" href="mailto:sachin.saxena@nxp.com"><sachin.saxena@nxp.com></a></font><br>
    <br>
    <div class="moz-cite-prefix">On 6/10/2022 6:38 PM, David Marchand
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAJFAV8zjgstnmftK3kBKEHXsxg_cqp6gHZ7nqVJG37-V04ApyQ@mail.gmail.com">
      <pre wrap="">On Wed, May 18, 2022 at 12:17 PM David Marchand
<a class="moz-txt-link-rfc2396E" href="mailto:david.marchand@redhat.com"><david.marchand@redhat.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
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: <a class="moz-txt-link-abbreviated" href="mailto:stable@dpdk.org">stable@dpdk.org</a>

Signed-off-by: David Marchand <a class="moz-txt-link-rfc2396E" href="mailto:david.marchand@redhat.com"><david.marchand@redhat.com></a>
</pre>
      </blockquote>
      <pre wrap="">
Any comment from driver maintainers?
Thanks.


</pre>
    </blockquote>
    <br>
  </body>
</html>