On Fri, 14 Aug 2026 19:44:36 +0530 Kshitiz Bartariya wrote:
> +static void ixgbe_get_queue_stats_rx(struct net_device *dev, int idx,
> +                                  struct netdev_queue_stats_rx *stats)
> +{
> +     struct ixgbe_adapter *adapter = ixgbe_from_netdev(dev);
> +     struct ixgbe_ring *ring = READ_ONCE(adapter->rx_ring[idx]);
> +     u64 bytes, packets, alloc_rx_page_failed, alloc_rx_buff_failed,
> +             csum_err;
> +     unsigned int start;
> +
> +     if (ring) {
> +             do {
> +                     start = u64_stats_fetch_begin(&ring->syncp);
> +                     bytes = ring->stats.bytes;
> +                     packets = ring->stats.packets;
> +                     alloc_rx_page_failed =
> +                             ring->rx_stats.alloc_rx_page_failed;
> +                     alloc_rx_buff_failed =
> +                             ring->rx_stats.alloc_rx_buff_failed;
> +                     csum_err = ring->rx_stats.csum_err;
> +             } while (u64_stats_fetch_retry(&ring->syncp, start));
> +     }
> +
> +     stats->bytes = bytes;

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:9772:6: warning: variable 'bytes' 
is used uninitialized whenever 'if' condition is false 
[-Wsometimes-uninitialized]
-- 
pw-not: cr

Reply via email to