tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: fabf035bcf07c8de58a4194b9440b566033892bb [972/1142] net: stmmac: add
stmmac_all_queue_pairs_enable|disable() for XDP setup
config: x86_64-randconfig-s021-20210718 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
#
https://github.com/intel/linux-intel-lts/commit/fabf035bcf07c8de58a4194b9...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout fabf035bcf07c8de58a4194b9440b566033892bb
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir
ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1462:6: sparse: sparse: symbol
'stmmac_alloc_rx_buffers' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: sparse: incorrect
type in assignment (different base types) @@ expected restricted __le32 [usertype]
etdes4 @@ got unsigned long @@
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: expected
restricted __le32 [usertype] etdes4
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2820:27: sparse: got unsigned
long
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: sparse: incorrect
type in assignment (different base types) @@ expected restricted __le32 [usertype]
etdes5 @@ got unsigned long @@
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: expected
restricted __le32 [usertype] etdes5
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2821:27: sparse: got unsigned
long
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: sparse: invalid
assignment: |=
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: left side has
type restricted __le32
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2822:27: sparse: right side has
type unsigned long
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5760:5: sparse:
sparse: symbol 'stmmac_all_queue_pairs_enable' was not declared. Should it be
static?
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5814:5: sparse: sparse: symbol
'stmmac_all_queue_pairs_disable' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5837:5: sparse: sparse: symbol
'stmmac_xdp_xmit' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:6552:6: sparse: sparse: symbol
'stmmac_clean_all_tx_rings' was not declared. Should it be static?
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2394:57: sparse: sparse: context
imbalance in 'stmmac_tx_clean' - unexpected unlock
vim +/stmmac_all_queue_pairs_enable +5760
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
5759
5760 int stmmac_all_queue_pairs_enable(struct stmmac_priv *priv)
5761 {
5762 int i;
5763
5764 mutex_lock(&priv->lock);
5765
5766 if (stmmac_enabled_xdp(priv))
5767 priv->plat->normal_tx_queue_count = priv->plat->num_queue_pairs;
5768 else
5769 priv->plat->normal_tx_queue_count =
5770 priv->plat->tx_queues_to_use;
5771
5772 for (i = 0; i < priv->plat->num_queue_pairs; i++) {
5773 int err = stmmac_queue_pair_enable(priv, i);
5774
5775 if (err)
5776 return err;
5777 }
5778
5779 mutex_unlock(&priv->lock);
5780
5781 return 0;
5782 }
5783
5784 /**
5785 * stmmac_queue_pair_disable - Disables a queue pair
5786 * @priv: driver private structure
5787 * @queue_pair: queue pair
5788 *
5789 * Returns 0 on success, <0 on failure.
5790 **/
5791 int stmmac_queue_pair_disable(struct stmmac_priv *priv, u16 qid)
5792 {
5793 u16 qp_num = priv->plat->num_queue_pairs;
5794 int ret;
5795
5796 if (qid >= qp_num) {
5797 netdev_err(priv->dev,
5798 "%s: qid (%d) > number of queue pairs (%d)\n",
5799 __func__, qid, qp_num);
5800
5801 return -EINVAL;
5802 }
5803
5804 stmmac_napi_control(priv, qid, false);
5805 ret = stmmac_txrx_irq_control(priv, qid, false);
5806 if (ret)
5807 return ret;
5808 stmmac_txrx_dma_control(priv, qid, false);
5809 stmmac_txrx_desc_control(priv, qid, false);
5810
5811 return ret;
5812 }
5813
5814 int stmmac_all_queue_pairs_disable(struct stmmac_priv *priv)
5815 {
5816 int i;
5817
5818 mutex_lock(&priv->lock);
5819
5820 for (i = 0; i < priv->plat->num_queue_pairs; i++) {
5821 int err = stmmac_queue_pair_disable(priv, i);
5822
5823 if (err)
5824 return err;
5825 }
5826
5827 mutex_unlock(&priv->lock);
5828
5829 return 0;
5830 }
5831
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org