linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Linux Memory Management List" <linux-mm@kvack.org>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Michael Shych" <michaelsh@nvidia.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [linux-next:master 11990/13297] drivers/platform/x86/mlx-platform.c:6204:8: error: call to undeclared function 'pci_request_region'; ISO C99 and later do not support implicit function declarations
Date: Wed, 30 Aug 2023 06:31:35 +0800	[thread overview]
Message-ID: <202308300642.mptI4L5U-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ae782d4e2bf53b0b642ae860794f7a39470f995a
commit: 02daa222fbdd6afe52c25e5c2894d53946a4260d [11990/13297] platform: mellanox: Add initial support for PCIe based programming logic device
config: x86_64-buildonly-randconfig-001-20230830 (https://download.01.org/0day-ci/archive/20230830/202308300642.mptI4L5U-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230830/202308300642.mptI4L5U-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308300642.mptI4L5U-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/platform/x86/mlx-platform.c:6204:8: error: call to undeclared function 'pci_request_region'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           err = pci_request_region(pci_dev, 0, res_name);
                 ^
   drivers/platform/x86/mlx-platform.c:6204:8: note: did you mean 'pci_request_regions'?
   include/linux/pci.h:1947:19: note: 'pci_request_regions' declared here
   static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
                     ^
   drivers/platform/x86/mlx-platform.c:6210:49: warning: shift count >= width of type [-Wshift-count-overflow]
           err = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(64));
                                                          ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   1 warning and 1 error generated.


vim +/pci_request_region +6204 drivers/platform/x86/mlx-platform.c

  6185	
  6186	static int
  6187	mlxplat_pci_fpga_device_init(unsigned int device, const char *res_name, struct pci_dev **pci_bridge,
  6188				     void __iomem **pci_bridge_addr)
  6189	{
  6190		void __iomem *pci_mem_addr;
  6191		struct pci_dev *pci_dev;
  6192		int err;
  6193	
  6194		pci_dev = pci_get_device(PCI_VENDOR_ID_LATTICE, device, NULL);
  6195		if (!pci_dev)
  6196			return -ENODEV;
  6197	
  6198		err = pci_enable_device(pci_dev);
  6199		if (err) {
  6200			dev_err(&pci_dev->dev, "pci_enable_device failed with error %d\n", err);
  6201			goto fail_pci_enable_device;
  6202		}
  6203	
> 6204		err = pci_request_region(pci_dev, 0, res_name);
  6205		if (err) {
  6206			dev_err(&pci_dev->dev, "pci_request_regions failed with error %d\n", err);
  6207			goto fail_pci_request_regions;
  6208		}
  6209	
  6210		err = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(64));
  6211		if (err) {
  6212			err = dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32));
  6213			if (err) {
  6214				dev_err(&pci_dev->dev, "dma_set_mask failed with error %d\n", err);
  6215				goto fail_pci_set_dma_mask;
  6216			}
  6217		}
  6218	
  6219		pci_set_master(pci_dev);
  6220	
  6221		pci_mem_addr = devm_ioremap(&pci_dev->dev, pci_resource_start(pci_dev, 0),
  6222					    pci_resource_len(pci_dev, 0));
  6223		if (!pci_mem_addr) {
  6224			dev_err(&mlxplat_dev->dev, "ioremap failed\n");
  6225			err = -EIO;
  6226			goto fail_ioremap;
  6227		}
  6228	
  6229		*pci_bridge = pci_dev;
  6230		*pci_bridge_addr = pci_mem_addr;
  6231	
  6232		return 0;
  6233	
  6234	fail_ioremap:
  6235	fail_pci_set_dma_mask:
  6236		pci_release_regions(pci_dev);
  6237	fail_pci_request_regions:
  6238		pci_disable_device(pci_dev);
  6239	fail_pci_enable_device:
  6240		return err;
  6241	}
  6242	

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


                 reply	other threads:[~2023-08-29 22:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202308300642.mptI4L5U-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=michaelsh@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=vadimp@nvidia.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