From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Moritz Fischer <mdf@kernel.org>,
Matthew Gerlach <matthew.gerlach@linux.intel.com>,
linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>,
Xu Yilun <yilun.xu@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v1 1/1] fpga: dfl: pci: Use pci_find_vsec_capability() when looking for DFL
Date: Mon, 15 Nov 2021 14:39:20 +0800 [thread overview]
Message-ID: <202111151454.5Se8cT59-lkp@intel.com> (raw)
In-Reply-To: <20211109154127.18455-1-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 6102 bytes --]
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc1 next-20211115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/fpga-dfl-pci-Use-pci_find_vsec_capability-when-looking-for-DFL/20211109-234228
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d2f38a3c6507b2520101f9a3807ed98f1bdc545a
config: i386-randconfig-a014-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/dfc10076ac7a63331954a33cabf94a1af3632210
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/fpga-dfl-pci-Use-pci_find_vsec_capability-when-looking-for-DFL/20211109-234228
git checkout dfc10076ac7a63331954a33cabf94a1af3632210
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/fpga/dfl-pci.c:146:34: error: use of undeclared identifier 'dev'
voff = pci_find_vsec_capability(dev, PCI_VENDOR_ID_INTEL, PCI_VSEC_ID_INTEL_DFLS);
^
>> drivers/fpga/dfl-pci.c:350:32: warning: shift count >= width of type [-Wshift-count-overflow]
if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/fpga/dfl-pci.c:351:45: warning: shift count >= width of type [-Wshift-count-overflow]
ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 1 error generated.
vim +350 drivers/fpga/dfl-pci.c
968b8199e2585a Wu Hao 2018-06-30 332
72ddd9f34040a4 Zhang Yi 2018-06-30 333 static
72ddd9f34040a4 Zhang Yi 2018-06-30 334 int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid)
72ddd9f34040a4 Zhang Yi 2018-06-30 335 {
72ddd9f34040a4 Zhang Yi 2018-06-30 336 int ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 337
72ddd9f34040a4 Zhang Yi 2018-06-30 338 ret = pcim_enable_device(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 339 if (ret < 0) {
72ddd9f34040a4 Zhang Yi 2018-06-30 340 dev_err(&pcidev->dev, "Failed to enable device %d.\n", ret);
72ddd9f34040a4 Zhang Yi 2018-06-30 341 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 342 }
72ddd9f34040a4 Zhang Yi 2018-06-30 343
72ddd9f34040a4 Zhang Yi 2018-06-30 344 ret = pci_enable_pcie_error_reporting(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 345 if (ret && ret != -EINVAL)
72ddd9f34040a4 Zhang Yi 2018-06-30 346 dev_info(&pcidev->dev, "PCIE AER unavailable %d.\n", ret);
72ddd9f34040a4 Zhang Yi 2018-06-30 347
72ddd9f34040a4 Zhang Yi 2018-06-30 348 pci_set_master(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 349
72ddd9f34040a4 Zhang Yi 2018-06-30 @350 if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
72ddd9f34040a4 Zhang Yi 2018-06-30 351 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
72ddd9f34040a4 Zhang Yi 2018-06-30 352 if (ret)
72ddd9f34040a4 Zhang Yi 2018-06-30 353 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 354 } else if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
72ddd9f34040a4 Zhang Yi 2018-06-30 355 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32));
72ddd9f34040a4 Zhang Yi 2018-06-30 356 if (ret)
72ddd9f34040a4 Zhang Yi 2018-06-30 357 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 358 } else {
72ddd9f34040a4 Zhang Yi 2018-06-30 359 ret = -EIO;
72ddd9f34040a4 Zhang Yi 2018-06-30 360 dev_err(&pcidev->dev, "No suitable DMA support available.\n");
72ddd9f34040a4 Zhang Yi 2018-06-30 361 goto disable_error_report_exit;
72ddd9f34040a4 Zhang Yi 2018-06-30 362 }
72ddd9f34040a4 Zhang Yi 2018-06-30 363
968b8199e2585a Wu Hao 2018-06-30 364 ret = cci_init_drvdata(pcidev);
968b8199e2585a Wu Hao 2018-06-30 365 if (ret) {
968b8199e2585a Wu Hao 2018-06-30 366 dev_err(&pcidev->dev, "Fail to init drvdata %d.\n", ret);
968b8199e2585a Wu Hao 2018-06-30 367 goto disable_error_report_exit;
968b8199e2585a Wu Hao 2018-06-30 368 }
968b8199e2585a Wu Hao 2018-06-30 369
968b8199e2585a Wu Hao 2018-06-30 370 ret = cci_enumerate_feature_devs(pcidev);
bfef946dbe1bbe Xu Yilun 2020-06-16 371 if (!ret)
968b8199e2585a Wu Hao 2018-06-30 372 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 373
bfef946dbe1bbe Xu Yilun 2020-06-16 374 dev_err(&pcidev->dev, "enumeration failure %d.\n", ret);
bfef946dbe1bbe Xu Yilun 2020-06-16 375
72ddd9f34040a4 Zhang Yi 2018-06-30 376 disable_error_report_exit:
72ddd9f34040a4 Zhang Yi 2018-06-30 377 pci_disable_pcie_error_reporting(pcidev);
72ddd9f34040a4 Zhang Yi 2018-06-30 378 return ret;
72ddd9f34040a4 Zhang Yi 2018-06-30 379 }
72ddd9f34040a4 Zhang Yi 2018-06-30 380
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35532 bytes --]
prev parent reply other threads:[~2021-11-15 6:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 15:41 [PATCH v1 1/1] fpga: dfl: pci: Use pci_find_vsec_capability() when looking for DFL Andy Shevchenko
2021-11-09 15:55 ` Tom Rix
2021-11-09 18:05 ` Andy Shevchenko
2021-11-09 18:27 ` Tom Rix
2021-11-09 18:51 ` matthew.gerlach
2021-11-10 3:44 ` Xu Yilun
2021-11-10 3:51 ` Wu, Hao
2021-11-10 8:24 ` Andy Shevchenko
2021-11-10 12:27 ` Tom Rix
2021-11-10 16:59 ` Andy Shevchenko
2024-04-03 11:01 ` Andy Shevchenko
2024-04-03 15:10 ` Xu Yilun
2024-04-03 15:46 ` Andy Shevchenko
2021-11-12 4:25 ` kernel test robot
2021-11-13 6:47 ` kernel test robot
2021-11-15 6:39 ` kernel test robot [this message]
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=202111151454.5Se8cT59-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hao.wu@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=matthew.gerlach@linux.intel.com \
--cc=mdf@kernel.org \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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 NNTP newsgroup(s).