All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/net/ethernet/intel/idpf/idpf_txrx.c:1385 idpf_txq_group_alloc() error: uninitialized symbol 'stashes'.
Date: Mon, 9 Dec 2024 12:05:00 +0800	[thread overview]
Message-ID: <202412071114.2bCcCFa2-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Alexander Lobakin <aleksander.lobakin@intel.com>
CC: Tony Nguyen <anthony.l.nguyen@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b5f217084ab3ddd4bdd03cd437f8e3b7e2d1f5b6
commit: e4891e4687c8dd136d80d6c1b857a02931ed6fc8 idpf: split &idpf_queue into 4 strictly-typed queue structures
date:   5 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 5 months ago
config: openrisc-randconfig-r072-20241206 (https://download.01.org/0day-ci/archive/20241207/202412071114.2bCcCFa2-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412071114.2bCcCFa2-lkp@intel.com/

smatch warnings:
drivers/net/ethernet/intel/idpf/idpf_txrx.c:1385 idpf_txq_group_alloc() error: uninitialized symbol 'stashes'.

vim +/stashes +1385 drivers/net/ethernet/intel/idpf/idpf_txrx.c

1c325aac10a82f1 Alan Brady        2023-08-07  1318  
1c325aac10a82f1 Alan Brady        2023-08-07  1319  /**
1c325aac10a82f1 Alan Brady        2023-08-07  1320   * idpf_txq_group_alloc - Allocate all txq group resources
1c325aac10a82f1 Alan Brady        2023-08-07  1321   * @vport: vport to allocate txq groups for
1c325aac10a82f1 Alan Brady        2023-08-07  1322   * @num_txq: number of txqs to allocate for each group
1c325aac10a82f1 Alan Brady        2023-08-07  1323   *
1c325aac10a82f1 Alan Brady        2023-08-07  1324   * Returns 0 on success, negative on failure
1c325aac10a82f1 Alan Brady        2023-08-07  1325   */
1c325aac10a82f1 Alan Brady        2023-08-07  1326  static int idpf_txq_group_alloc(struct idpf_vport *vport, u16 num_txq)
1c325aac10a82f1 Alan Brady        2023-08-07  1327  {
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1328  	bool split, flow_sch_en;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1329  	int i;
1c325aac10a82f1 Alan Brady        2023-08-07  1330  
1c325aac10a82f1 Alan Brady        2023-08-07  1331  	vport->txq_grps = kcalloc(vport->num_txq_grp,
1c325aac10a82f1 Alan Brady        2023-08-07  1332  				  sizeof(*vport->txq_grps), GFP_KERNEL);
1c325aac10a82f1 Alan Brady        2023-08-07  1333  	if (!vport->txq_grps)
1c325aac10a82f1 Alan Brady        2023-08-07  1334  		return -ENOMEM;
1c325aac10a82f1 Alan Brady        2023-08-07  1335  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1336  	split = idpf_is_queue_model_split(vport->txq_model);
d38b4d0d95bc0c7 Michal Kubiak     2023-10-23  1337  	flow_sch_en = !idpf_is_cap_ena(vport->adapter, IDPF_OTHER_CAPS,
d38b4d0d95bc0c7 Michal Kubiak     2023-10-23  1338  				       VIRTCHNL2_CAP_SPLITQ_QSCHED);
d38b4d0d95bc0c7 Michal Kubiak     2023-10-23  1339  
1c325aac10a82f1 Alan Brady        2023-08-07  1340  	for (i = 0; i < vport->num_txq_grp; i++) {
1c325aac10a82f1 Alan Brady        2023-08-07  1341  		struct idpf_txq_group *tx_qgrp = &vport->txq_grps[i];
1c325aac10a82f1 Alan Brady        2023-08-07  1342  		struct idpf_adapter *adapter = vport->adapter;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1343  		struct idpf_txq_stash *stashes;
1c325aac10a82f1 Alan Brady        2023-08-07  1344  		int j;
1c325aac10a82f1 Alan Brady        2023-08-07  1345  
1c325aac10a82f1 Alan Brady        2023-08-07  1346  		tx_qgrp->vport = vport;
1c325aac10a82f1 Alan Brady        2023-08-07  1347  		tx_qgrp->num_txq = num_txq;
1c325aac10a82f1 Alan Brady        2023-08-07  1348  
1c325aac10a82f1 Alan Brady        2023-08-07  1349  		for (j = 0; j < tx_qgrp->num_txq; j++) {
1c325aac10a82f1 Alan Brady        2023-08-07  1350  			tx_qgrp->txqs[j] = kzalloc(sizeof(*tx_qgrp->txqs[j]),
1c325aac10a82f1 Alan Brady        2023-08-07  1351  						   GFP_KERNEL);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1352  			if (!tx_qgrp->txqs[j])
1c325aac10a82f1 Alan Brady        2023-08-07  1353  				goto err_alloc;
1c325aac10a82f1 Alan Brady        2023-08-07  1354  		}
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1355  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1356  		if (split && flow_sch_en) {
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1357  			stashes = kcalloc(num_txq, sizeof(*stashes),
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1358  					  GFP_KERNEL);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1359  			if (!stashes)
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1360  				goto err_alloc;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1361  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1362  			tx_qgrp->stashes = stashes;
1c325aac10a82f1 Alan Brady        2023-08-07  1363  		}
1c325aac10a82f1 Alan Brady        2023-08-07  1364  
1c325aac10a82f1 Alan Brady        2023-08-07  1365  		for (j = 0; j < tx_qgrp->num_txq; j++) {
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1366  			struct idpf_tx_queue *q = tx_qgrp->txqs[j];
1c325aac10a82f1 Alan Brady        2023-08-07  1367  
1c325aac10a82f1 Alan Brady        2023-08-07  1368  			q->dev = &adapter->pdev->dev;
1c325aac10a82f1 Alan Brady        2023-08-07  1369  			q->desc_count = vport->txq_desc_count;
1c325aac10a82f1 Alan Brady        2023-08-07  1370  			q->tx_max_bufs = idpf_get_max_tx_bufs(adapter);
1c325aac10a82f1 Alan Brady        2023-08-07  1371  			q->tx_min_pkt_len = idpf_get_min_tx_pkt_len(adapter);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1372  			q->netdev = vport->netdev;
1c325aac10a82f1 Alan Brady        2023-08-07  1373  			q->txq_grp = tx_qgrp;
1c325aac10a82f1 Alan Brady        2023-08-07  1374  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1375  			if (!split) {
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1376  				q->clean_budget = vport->compln_clean_budget;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1377  				idpf_queue_assign(CRC_EN, q,
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1378  						  vport->crc_enable);
1c325aac10a82f1 Alan Brady        2023-08-07  1379  			}
1c325aac10a82f1 Alan Brady        2023-08-07  1380  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1381  			if (!flow_sch_en)
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1382  				continue;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1383  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1384  			if (split) {
e4891e4687c8dd1 Alexander Lobakin 2024-06-20 @1385  				q->stash = &stashes[j];
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1386  				hash_init(q->stash->sched_buf_hash);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1387  			}
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1388  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1389  			idpf_queue_set(FLOW_SCH_EN, q);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1390  		}
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1391  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1392  		if (!split)
1c325aac10a82f1 Alan Brady        2023-08-07  1393  			continue;
1c325aac10a82f1 Alan Brady        2023-08-07  1394  
1c325aac10a82f1 Alan Brady        2023-08-07  1395  		tx_qgrp->complq = kcalloc(IDPF_COMPLQ_PER_GROUP,
1c325aac10a82f1 Alan Brady        2023-08-07  1396  					  sizeof(*tx_qgrp->complq),
1c325aac10a82f1 Alan Brady        2023-08-07  1397  					  GFP_KERNEL);
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1398  		if (!tx_qgrp->complq)
1c325aac10a82f1 Alan Brady        2023-08-07  1399  			goto err_alloc;
1c325aac10a82f1 Alan Brady        2023-08-07  1400  
1c325aac10a82f1 Alan Brady        2023-08-07  1401  		tx_qgrp->complq->desc_count = vport->complq_desc_count;
1c325aac10a82f1 Alan Brady        2023-08-07  1402  		tx_qgrp->complq->txq_grp = tx_qgrp;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1403  		tx_qgrp->complq->netdev = vport->netdev;
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1404  		tx_qgrp->complq->clean_budget = vport->compln_clean_budget;
d38b4d0d95bc0c7 Michal Kubiak     2023-10-23  1405  
d38b4d0d95bc0c7 Michal Kubiak     2023-10-23  1406  		if (flow_sch_en)
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1407  			idpf_queue_set(FLOW_SCH_EN, tx_qgrp->complq);
1c325aac10a82f1 Alan Brady        2023-08-07  1408  	}
1c325aac10a82f1 Alan Brady        2023-08-07  1409  
1c325aac10a82f1 Alan Brady        2023-08-07  1410  	return 0;
1c325aac10a82f1 Alan Brady        2023-08-07  1411  
1c325aac10a82f1 Alan Brady        2023-08-07  1412  err_alloc:
1c325aac10a82f1 Alan Brady        2023-08-07  1413  	idpf_txq_group_rel(vport);
1c325aac10a82f1 Alan Brady        2023-08-07  1414  
e4891e4687c8dd1 Alexander Lobakin 2024-06-20  1415  	return -ENOMEM;
1c325aac10a82f1 Alan Brady        2023-08-07  1416  }
1c325aac10a82f1 Alan Brady        2023-08-07  1417  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2024-12-09  4:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09  4:05 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-20 11:32 drivers/net/ethernet/intel/idpf/idpf_txrx.c:1385 idpf_txq_group_alloc() error: uninitialized symbol 'stashes' kernel test robot
2024-09-15 12:24 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412071114.2bCcCFa2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.