[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212291034.DTVMA9KP-lkp@intel.com>
Date: Thu, 29 Dec 2022 10:08:19 +0800
From: kernel test robot <lkp@...el.com>
To: Benjamin Mikailenko <benjamin.mikailenko@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Tony Nguyen <anthony.l.nguyen@...el.com>
Subject: drivers/net/ethernet/intel/ice/ice_lib.c:1673
ice_vsi_alloc_ring_stats() warn: inconsistent indenting
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1b929c02afd37871d5afb9d498426f83432e71c2
commit: 288ecf491b1654845ae99c79b7fefad2d3ea47bd ice: Accumulate ring statistics over reset
date: 5 weeks ago
config: powerpc-randconfig-m031-20221226
compiler: powerpc-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
smatch warnings:
drivers/net/ethernet/intel/ice/ice_lib.c:1673 ice_vsi_alloc_ring_stats() warn: inconsistent indenting
drivers/net/ethernet/intel/ice/ice_lib.c:3612 ice_vsi_rebuild() warn: missing error code 'ret'
vim +1673 drivers/net/ethernet/intel/ice/ice_lib.c
1624
1625 /**
1626 * ice_vsi_alloc_ring_stats - Allocates Tx and Rx ring stats for the VSI
1627 * @vsi: VSI which is having stats allocated
1628 */
1629 static int ice_vsi_alloc_ring_stats(struct ice_vsi *vsi)
1630 {
1631 struct ice_ring_stats **tx_ring_stats;
1632 struct ice_ring_stats **rx_ring_stats;
1633 struct ice_vsi_stats *vsi_stats;
1634 struct ice_pf *pf = vsi->back;
1635 u16 i;
1636
1637 vsi_stats = pf->vsi_stats[vsi->idx];
1638 tx_ring_stats = vsi_stats->tx_ring_stats;
1639 rx_ring_stats = vsi_stats->rx_ring_stats;
1640
1641 /* Allocate Tx ring stats */
1642 ice_for_each_alloc_txq(vsi, i) {
1643 struct ice_ring_stats *ring_stats;
1644 struct ice_tx_ring *ring;
1645
1646 ring = vsi->tx_rings[i];
1647 ring_stats = tx_ring_stats[i];
1648
1649 if (!ring_stats) {
1650 ring_stats = kzalloc(sizeof(*ring_stats), GFP_KERNEL);
1651 if (!ring_stats)
1652 goto err_out;
1653
1654 WRITE_ONCE(tx_ring_stats[i], ring_stats);
1655 }
1656
1657 ring->ring_stats = ring_stats;
1658 }
1659
1660 /* Allocate Rx ring stats */
1661 ice_for_each_alloc_rxq(vsi, i) {
1662 struct ice_ring_stats *ring_stats;
1663 struct ice_rx_ring *ring;
1664
1665 ring = vsi->rx_rings[i];
1666 ring_stats = rx_ring_stats[i];
1667
1668 if (!ring_stats) {
1669 ring_stats = kzalloc(sizeof(*ring_stats), GFP_KERNEL);
1670 if (!ring_stats)
1671 goto err_out;
1672
> 1673 WRITE_ONCE(rx_ring_stats[i], ring_stats);
1674 }
1675
1676 ring->ring_stats = ring_stats;
1677 }
1678
1679 return 0;
1680
1681 err_out:
1682 ice_vsi_free_stats(vsi);
1683 return -ENOMEM;
1684 }
1685
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (183129 bytes)
Powered by blists - more mailing lists