oe-kbuild.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, cros-kernel-buildreports@googlegroups.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev
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: Mon, 22 Apr 2024 16:05:19 +0300	[thread overview]
Message-ID: <70391d67-e5b9-4b8e-9462-20bb01dcd897@moroto.mountain> (raw)

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
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 <dan.carpenter@linaro.org>
| 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'

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

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)) {

ret = pci_register_driver(&vntb_pci_driver);
if (ret) {

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  }

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


             reply	other threads:[~2024-04-22 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 13:05 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-18 21:10 [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' 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=70391d67-e5b9-4b8e-9462-20bb01dcd897@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).