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: [android-common:upstream-linux-5.15.y 264/377] drivers/pci/endpoint/functions/pci-epf-vntb.c:1316 epf_ntb_bind() warn: missing error code 'ret'
Date: Fri, 19 Apr 2024 05:10:29 +0800	[thread overview]
Message-ID: <202404190553.UtOSurIn-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: cros-kernel-buildreports@googlegroups.com

tree:   https://android.googlesource.com/kernel/common upstream-linux-5.15.y
head:   c52b9710c83d3b8ab63bb217cc7c8b61e13f12cd
commit: e2b6ef72b7aea9d7d480d2df499bcd1c93247abb [264/377] PCI: endpoint: Support NTB transfer between RC and EP
:::::: branch date: 2 days ago
:::::: commit date: 3 weeks ago
config: x86_64-randconfig-161-20240419 (https://download.01.org/0day-ci/archive/20240419/202404190553.UtOSurIn-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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/202404190553.UtOSurIn-lkp@intel.com/

New smatch warnings:
drivers/pci/endpoint/functions/pci-epf-vntb.c:1316 epf_ntb_bind() warn: missing error code 'ret'

Old smatch warnings:
drivers/pci/endpoint/functions/pci-epf-vntb.c:891 epf_ntb_mw1_store() warn: potential spectre issue 'ntb->mws_size' [w]
drivers/pci/endpoint/functions/pci-epf-vntb.c:893 epf_ntb_mw2_store() warn: potential spectre issue 'ntb->mws_size' [w]
drivers/pci/endpoint/functions/pci-epf-vntb.c:895 epf_ntb_mw3_store() warn: potential spectre issue 'ntb->mws_size' [w]
drivers/pci/endpoint/functions/pci-epf-vntb.c:897 epf_ntb_mw4_store() warn: potential spectre issue 'ntb->mws_size' [w]

vim +/ret +1316 drivers/pci/endpoint/functions/pci-epf-vntb.c

e2b6ef72b7aea9 Frank Li 2022-02-22  1269  
e2b6ef72b7aea9 Frank Li 2022-02-22  1270  /**
e2b6ef72b7aea9 Frank Li 2022-02-22  1271   * epf_ntb_bind() - Initialize endpoint controller to provide NTB functionality
e2b6ef72b7aea9 Frank Li 2022-02-22  1272   * @epf: NTB endpoint function device
e2b6ef72b7aea9 Frank Li 2022-02-22  1273   *
e2b6ef72b7aea9 Frank Li 2022-02-22  1274   * Initialize both the endpoint controllers associated with NTB function device.
e2b6ef72b7aea9 Frank Li 2022-02-22  1275   * Invoked when a primary interface or secondary interface is bound to EPC
e2b6ef72b7aea9 Frank Li 2022-02-22  1276   * device. This function will succeed only when EPC is bound to both the
e2b6ef72b7aea9 Frank Li 2022-02-22  1277   * interfaces.
e2b6ef72b7aea9 Frank Li 2022-02-22  1278   */
e2b6ef72b7aea9 Frank Li 2022-02-22  1279  static int epf_ntb_bind(struct pci_epf *epf)
e2b6ef72b7aea9 Frank Li 2022-02-22  1280  {
e2b6ef72b7aea9 Frank Li 2022-02-22  1281  	struct epf_ntb *ntb = epf_get_drvdata(epf);
e2b6ef72b7aea9 Frank Li 2022-02-22  1282  	struct device *dev = &epf->dev;
e2b6ef72b7aea9 Frank Li 2022-02-22  1283  	int ret;
e2b6ef72b7aea9 Frank Li 2022-02-22  1284  
e2b6ef72b7aea9 Frank Li 2022-02-22  1285  	if (!epf->epc) {
e2b6ef72b7aea9 Frank Li 2022-02-22  1286  		dev_dbg(dev, "PRIMARY EPC interface not yet bound\n");
e2b6ef72b7aea9 Frank Li 2022-02-22  1287  		return 0;
e2b6ef72b7aea9 Frank Li 2022-02-22  1288  	}
e2b6ef72b7aea9 Frank Li 2022-02-22  1289  
e2b6ef72b7aea9 Frank Li 2022-02-22  1290  	ret = epf_ntb_init_epc_bar(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1291  	if (ret) {
e2b6ef72b7aea9 Frank Li 2022-02-22  1292  		dev_err(dev, "Failed to create NTB EPC\n");
e2b6ef72b7aea9 Frank Li 2022-02-22  1293  		goto err_bar_init;
e2b6ef72b7aea9 Frank Li 2022-02-22  1294  	}
e2b6ef72b7aea9 Frank Li 2022-02-22  1295  
e2b6ef72b7aea9 Frank Li 2022-02-22  1296  	ret = epf_ntb_config_spad_bar_alloc(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1297  	if (ret) {
e2b6ef72b7aea9 Frank Li 2022-02-22  1298  		dev_err(dev, "Failed to allocate BAR memory\n");
e2b6ef72b7aea9 Frank Li 2022-02-22  1299  		goto err_bar_alloc;
e2b6ef72b7aea9 Frank Li 2022-02-22  1300  	}
e2b6ef72b7aea9 Frank Li 2022-02-22  1301  
e2b6ef72b7aea9 Frank Li 2022-02-22  1302  	ret = epf_ntb_epc_init(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1303  	if (ret) {
e2b6ef72b7aea9 Frank Li 2022-02-22  1304  		dev_err(dev, "Failed to initialize EPC\n");
e2b6ef72b7aea9 Frank Li 2022-02-22  1305  		goto err_bar_alloc;
e2b6ef72b7aea9 Frank Li 2022-02-22  1306  	}
e2b6ef72b7aea9 Frank Li 2022-02-22  1307  
e2b6ef72b7aea9 Frank Li 2022-02-22  1308  	epf_set_drvdata(epf, ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1309  
e2b6ef72b7aea9 Frank Li 2022-02-22  1310  	pci_space[0] = (ntb->vntb_pid << 16) | ntb->vntb_vid;
e2b6ef72b7aea9 Frank Li 2022-02-22  1311  	pci_vntb_table[0].vendor = ntb->vntb_vid;
e2b6ef72b7aea9 Frank Li 2022-02-22  1312  	pci_vntb_table[0].device = ntb->vntb_pid;
e2b6ef72b7aea9 Frank Li 2022-02-22  1313  
e2b6ef72b7aea9 Frank Li 2022-02-22  1314  	if (pci_register_driver(&vntb_pci_driver)) {
e2b6ef72b7aea9 Frank Li 2022-02-22  1315  		dev_err(dev, "failure register vntb pci driver\n");
e2b6ef72b7aea9 Frank Li 2022-02-22 @1316  		goto err_bar_alloc;
e2b6ef72b7aea9 Frank Li 2022-02-22  1317  	}
e2b6ef72b7aea9 Frank Li 2022-02-22  1318  
e2b6ef72b7aea9 Frank Li 2022-02-22  1319  	vpci_scan_bus(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1320  
e2b6ef72b7aea9 Frank Li 2022-02-22  1321  	return 0;
e2b6ef72b7aea9 Frank Li 2022-02-22  1322  
e2b6ef72b7aea9 Frank Li 2022-02-22  1323  err_bar_alloc:
e2b6ef72b7aea9 Frank Li 2022-02-22  1324  	epf_ntb_config_spad_bar_free(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1325  
e2b6ef72b7aea9 Frank Li 2022-02-22  1326  err_bar_init:
e2b6ef72b7aea9 Frank Li 2022-02-22  1327  	epf_ntb_epc_destroy(ntb);
e2b6ef72b7aea9 Frank Li 2022-02-22  1328  
e2b6ef72b7aea9 Frank Li 2022-02-22  1329  	return ret;
e2b6ef72b7aea9 Frank Li 2022-02-22  1330  }
e2b6ef72b7aea9 Frank Li 2022-02-22  1331  

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

             reply	other threads:[~2024-04-18 21:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 21:10 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-22 13:05 [android-common:upstream-linux-5.15.y 264/377] drivers/pci/endpoint/functions/pci-epf-vntb.c:1316 epf_ntb_bind() warn: missing error code 'ret' Dan Carpenter

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=202404190553.UtOSurIn-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.