[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202110182052.wFGUaZ1G-lkp@intel.com>
Date: Mon, 18 Oct 2021 20:45:32 +0800
From: kernel test robot <lkp@...el.com>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
Bjorn Helgaas <helgaas@...nel.org>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: Remove the unused pci wrappers pci_pool_xxx()
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on v5.15-rc6 next-20211018]
[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/Cai-Huoqing/PCI-Remove-the-unused-pci-wrappers-pci_pool_xxx/20211018-161828
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-randconfig-a015-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/35cdbe7c76652cc75a170ef91c4dafac9773e8c0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/PCI-Remove-the-unused-pci-wrappers-pci_pool_xxx/20211018-161828
git checkout 35cdbe7c76652cc75a170ef91c4dafac9773e8c0
# 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@...el.com>
All error/warnings (new ones prefixed by >>):
>> drivers/scsi/lpfc/lpfc_mem.c:92:25: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
phba->lpfc_mbuf_pool = dma_pool_create("lpfc_mbuf_pool", &phba->pcidev->dev,
^
drivers/scsi/lpfc/lpfc_mem.c:92:25: note: did you mean 'mempool_create'?
include/linux/mempool.h:40:19: note: 'mempool_create' declared here
extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
^
>> drivers/scsi/lpfc/lpfc_mem.c:92:23: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_mbuf_pool = dma_pool_create("lpfc_mbuf_pool", &phba->pcidev->dev,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/lpfc/lpfc_mem.c:107:28: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
pool->elements[i].virt = dma_pool_alloc(phba->lpfc_mbuf_pool,
^
drivers/scsi/lpfc/lpfc_mem.c:107:28: note: did you mean 'mempool_alloc'?
include/linux/mempool.h:48:14: note: 'mempool_alloc' declared here
extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;
^
>> drivers/scsi/lpfc/lpfc_mem.c:107:26: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
pool->elements[i].virt = dma_pool_alloc(phba->lpfc_mbuf_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:131:23: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_hrb_pool = dma_pool_create("lpfc_hrb_pool",
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:137:23: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_drb_pool = dma_pool_create("lpfc_drb_pool",
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:144:23: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_hbq_pool = dma_pool_create("lpfc_hbq_pool",
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/lpfc/lpfc_mem.c:164:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(phba->lpfc_drb_pool);
^
drivers/scsi/lpfc/lpfc_mem.c:164:2: note: did you mean 'mempool_destroy'?
include/linux/mempool.h:47:13: note: 'mempool_destroy' declared here
extern void mempool_destroy(mempool_t *pool);
^
>> drivers/scsi/lpfc/lpfc_mem.c:180:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt,
^
drivers/scsi/lpfc/lpfc_mem.c:194:3: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
dma_pool_create("lpfc_nvmet_drb_pool",
^
drivers/scsi/lpfc/lpfc_mem.c:193:28: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_nvmet_drb_pool =
^
drivers/scsi/lpfc/lpfc_mem.c:223:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(phba->lpfc_nvmet_drb_pool);
^
drivers/scsi/lpfc/lpfc_mem.c:252:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt,
^
drivers/scsi/lpfc/lpfc_mem.c:332:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(phba->lpfc_sg_dma_buf_pool);
^
drivers/scsi/lpfc/lpfc_mem.c:383:8: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
ret = dma_pool_alloc(phba->lpfc_mbuf_pool, GFP_KERNEL, handle);
^
drivers/scsi/lpfc/lpfc_mem.c:383:6: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
ret = dma_pool_alloc(phba->lpfc_mbuf_pool, GFP_KERNEL, handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:419:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_mbuf_pool, virt, dma);
^
drivers/scsi/lpfc/lpfc_mem.c:467:8: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
ret = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool, GFP_KERNEL, handle);
^
drivers/scsi/lpfc/lpfc_mem.c:467:6: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
ret = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool, GFP_KERNEL, handle);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:483:2: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool, virt, dma);
^
drivers/scsi/lpfc/lpfc_mem.c:508:21: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
hbqbp->dbuf.virt = dma_pool_alloc(phba->lpfc_hbq_pool, GFP_KERNEL,
^
drivers/scsi/lpfc/lpfc_mem.c:508:19: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
hbqbp->dbuf.virt = dma_pool_alloc(phba->lpfc_hbq_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:533:2: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_hbq_pool, hbqbp->dbuf.virt, hbqbp->dbuf.phys);
^
drivers/scsi/lpfc/lpfc_mem.c:560:23: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL,
^
drivers/scsi/lpfc/lpfc_mem.c:560:21: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:566:21: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:569:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt,
^
drivers/scsi/lpfc/lpfc_mem.c:593:2: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys);
^
drivers/scsi/lpfc/lpfc_mem.c:618:23: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL,
^
drivers/scsi/lpfc/lpfc_mem.c:618:21: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:624:21: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_nvmet_drb_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_mem.c:627:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
--
drivers/scsi/lpfc/lpfc_sli.c:15629:6: warning: variable 'i' set but not used [-Wunused-but-set-variable]
int i = 0;
^
>> drivers/scsi/lpfc/lpfc_sli.c:19245:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_drb_pool, pcmd->virt, pcmd->phys);
^
drivers/scsi/lpfc/lpfc_sli.c:19245:3: note: did you mean 'mempool_free'?
include/linux/mempool.h:49:13: note: 'mempool_free' declared here
extern void mempool_free(void *element, mempool_t *pool);
^
>> drivers/scsi/lpfc/lpfc_sli.c:19283:16: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
pcmd->virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL,
^
drivers/scsi/lpfc/lpfc_sli.c:19283:16: note: did you mean 'mempool_alloc'?
include/linux/mempool.h:48:14: note: 'mempool_alloc' declared here
extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;
^
>> drivers/scsi/lpfc/lpfc_sli.c:19283:14: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
pcmd->virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_sli.c:19332:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_drb_pool, pcmd->virt, pcmd->phys);
^
drivers/scsi/lpfc/lpfc_sli.c:22226:18: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
tmp->dma_sgl = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool,
^
>> drivers/scsi/lpfc/lpfc_sli.c:22226:16: warning: incompatible integer to pointer conversion assigning to 'struct sli4_sge *' from 'int' [-Wint-conversion]
tmp->dma_sgl = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_sli.c:22312:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_sli.c:22369:19: error: implicit declaration of function 'dma_pool_alloc' [-Werror,-Wimplicit-function-declaration]
tmp->fcp_cmnd = dma_pool_alloc(phba->lpfc_cmd_rsp_buf_pool,
^
>> drivers/scsi/lpfc/lpfc_sli.c:22369:17: warning: incompatible integer to pointer conversion assigning to 'struct fcp_cmnd *' from 'int' [-Wint-conversion]
tmp->fcp_cmnd = dma_pool_alloc(phba->lpfc_cmd_rsp_buf_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_sli.c:22462:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_cmd_rsp_buf_pool,
^
4 warnings and 7 errors generated.
--
>> drivers/scsi/lpfc/lpfc_init.c:3804:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool, sb->data,
^
drivers/scsi/lpfc/lpfc_init.c:3804:3: note: did you mean 'mempool_free'?
include/linux/mempool.h:49:13: note: 'mempool_free' declared here
extern void mempool_free(void *element, mempool_t *pool);
^
drivers/scsi/lpfc/lpfc_init.c:3815:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool, sb->data,
^
drivers/scsi/lpfc/lpfc_init.c:3848:4: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_init.c:3864:4: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_init.c:4260:5: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
>> drivers/scsi/lpfc/lpfc_init.c:4330:21: error: implicit declaration of function 'dma_pool_zalloc' [-Werror,-Wimplicit-function-declaration]
lpfc_ncmd->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_init.c:4330:21: note: did you mean 'mempool_alloc'?
include/linux/mempool.h:48:14: note: 'mempool_alloc' declared here
extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;
^
>> drivers/scsi/lpfc/lpfc_init.c:4330:19: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
lpfc_ncmd->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_init.c:4353:5: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_init.c:4365:4: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_init.c:4375:4: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
>> drivers/scsi/lpfc/lpfc_init.c:7686:3: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
dma_pool_create("lpfc_sg_dma_buf_pool",
^
drivers/scsi/lpfc/lpfc_init.c:7686:3: note: did you mean 'mempool_create'?
include/linux/mempool.h:40:19: note: 'mempool_create' declared here
extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
^
>> drivers/scsi/lpfc/lpfc_init.c:7685:29: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_sg_dma_buf_pool =
^
drivers/scsi/lpfc/lpfc_init.c:7693:30: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_cmd_rsp_buf_pool =
^
>> drivers/scsi/lpfc/lpfc_init.c:7723:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(phba->lpfc_sg_dma_buf_pool);
^
drivers/scsi/lpfc/lpfc_init.c:7723:2: note: did you mean 'mempool_destroy'?
include/linux/mempool.h:47:13: note: 'mempool_destroy' declared here
extern void mempool_destroy(mempool_t *pool);
^
drivers/scsi/lpfc/lpfc_init.c:8139:4: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
dma_pool_create("lpfc_sg_dma_buf_pool",
^
drivers/scsi/lpfc/lpfc_init.c:8138:29: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_sg_dma_buf_pool =
^
drivers/scsi/lpfc/lpfc_init.c:8146:30: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
phba->lpfc_cmd_rsp_buf_pool =
^
drivers/scsi/lpfc/lpfc_init.c:8300:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(phba->lpfc_cmd_rsp_buf_pool);
^
5 warnings and 13 errors generated.
--
>> drivers/scsi/lpfc/lpfc_scsi.c:349:15: error: implicit declaration of function 'dma_pool_zalloc' [-Werror,-Wimplicit-function-declaration]
psb->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_scsi.c:349:15: note: did you mean 'mempool_alloc'?
include/linux/mempool.h:48:14: note: 'mempool_alloc' declared here
extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;
^
>> drivers/scsi/lpfc/lpfc_scsi.c:349:13: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
psb->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/scsi/lpfc/lpfc_scsi.c:360:4: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(phba->lpfc_sg_dma_buf_pool,
^
drivers/scsi/lpfc/lpfc_scsi.c:360:4: note: did you mean 'mempool_free'?
include/linux/mempool.h:49:13: note: 'mempool_free' declared here
extern void mempool_free(void *element, mempool_t *pool);
^
1 warning and 2 errors generated.
--
>> drivers/net/ethernet/alacritech/slicoss.c:852:18: error: implicit declaration of function 'dma_pool_create' [-Werror,-Wimplicit-function-declaration]
txq->dma_pool = dma_pool_create("slic_pool", &sdev->pdev->dev,
^
drivers/net/ethernet/alacritech/slicoss.c:852:18: note: did you mean 'page_pool_create'?
include/net/page_pool.h:169:19: note: 'page_pool_create' declared here
struct page_pool *page_pool_create(const struct page_pool_params *params);
^
>> drivers/net/ethernet/alacritech/slicoss.c:852:16: warning: incompatible integer to pointer conversion assigning to 'struct dma_pool *' from 'int' [-Wint-conversion]
txq->dma_pool = dma_pool_create("slic_pool", &sdev->pdev->dev,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/alacritech/slicoss.c:863:10: error: implicit declaration of function 'dma_pool_zalloc' [-Werror,-Wimplicit-function-declaration]
desc = dma_pool_zalloc(txq->dma_pool, GFP_KERNEL,
^
>> drivers/net/ethernet/alacritech/slicoss.c:863:8: warning: incompatible integer to pointer conversion assigning to 'struct slic_tx_desc *' from 'int' [-Wint-conversion]
desc = dma_pool_zalloc(txq->dma_pool, GFP_KERNEL,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/alacritech/slicoss.c:884:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(txq->dma_pool, buff->desc, buff->desc_paddr);
^
drivers/net/ethernet/alacritech/slicoss.c:884:3: note: did you mean 'dma_pool_create'?
drivers/net/ethernet/alacritech/slicoss.c:852:18: note: 'dma_pool_create' declared here
txq->dma_pool = dma_pool_create("slic_pool", &sdev->pdev->dev,
^
>> drivers/net/ethernet/alacritech/slicoss.c:886:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(txq->dma_pool);
^
drivers/net/ethernet/alacritech/slicoss.c:886:2: note: did you mean 'page_pool_destroy'?
include/net/page_pool.h:172:6: note: 'page_pool_destroy' declared here
void page_pool_destroy(struct page_pool *pool);
^
drivers/net/ethernet/alacritech/slicoss.c:902:3: error: implicit declaration of function 'dma_pool_free' [-Werror,-Wimplicit-function-declaration]
dma_pool_free(txq->dma_pool, buff->desc, buff->desc_paddr);
^
drivers/net/ethernet/alacritech/slicoss.c:911:2: error: implicit declaration of function 'dma_pool_destroy' [-Werror,-Wimplicit-function-declaration]
dma_pool_destroy(txq->dma_pool);
^
2 warnings and 6 errors generated.
vim +/dma_pool_create +92 drivers/scsi/lpfc/lpfc_mem.c
2e0fef85e098f6 James Smart 2007-06-17 68
e59058c44025d7 James Smart 2008-08-24 69 /**
3621a710a7dbb2 James Smart 2009-04-06 70 * lpfc_mem_alloc - create and allocate all PCI and memory pools
e59058c44025d7 James Smart 2008-08-24 71 * @phba: HBA to allocate pools for
c734de98a7bc3d Lee Jones 2020-07-21 72 * @align: alignment requirement for blocks; must be a power of two
e59058c44025d7 James Smart 2008-08-24 73 *
d79c9e9d4b3d93 James Smart 2019-08-14 74 * Description: Creates and allocates PCI pools lpfc_mbuf_pool,
d79c9e9d4b3d93 James Smart 2019-08-14 75 * lpfc_hrb_pool. Creates and allocates kmalloc-backed mempools
e59058c44025d7 James Smart 2008-08-24 76 * for LPFC_MBOXQ_t and lpfc_nodelist. Also allocates the VPI bitmask.
e59058c44025d7 James Smart 2008-08-24 77 *
e59058c44025d7 James Smart 2008-08-24 78 * Notes: Not interrupt-safe. Must be called with no locks held. If any
e59058c44025d7 James Smart 2008-08-24 79 * allocation fails, frees all successfully allocated memory before returning.
e59058c44025d7 James Smart 2008-08-24 80 *
e59058c44025d7 James Smart 2008-08-24 81 * Returns:
e59058c44025d7 James Smart 2008-08-24 82 * 0 on success
e59058c44025d7 James Smart 2008-08-24 83 * -ENOMEM on failure (if any memory allocations fail)
e59058c44025d7 James Smart 2008-08-24 84 **/
dea3101e0a5c89 James Bottomley 2005-04-17 85 int
da0436e915a5c1 James Smart 2009-05-22 86 lpfc_mem_alloc(struct lpfc_hba *phba, int align)
dea3101e0a5c89 James Bottomley 2005-04-17 87 {
dea3101e0a5c89 James Bottomley 2005-04-17 88 struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool;
dea3101e0a5c89 James Bottomley 2005-04-17 89 int i;
dea3101e0a5c89 James Bottomley 2005-04-17 90
dea3101e0a5c89 James Bottomley 2005-04-17 91
771db5c0e3f5da Romain Perier 2017-07-06 @92 phba->lpfc_mbuf_pool = dma_pool_create("lpfc_mbuf_pool", &phba->pcidev->dev,
da0436e915a5c1 James Smart 2009-05-22 93 LPFC_BPL_SIZE,
da0436e915a5c1 James Smart 2009-05-22 94 align, 0);
dea3101e0a5c89 James Bottomley 2005-04-17 95 if (!phba->lpfc_mbuf_pool)
d79c9e9d4b3d93 James Smart 2019-08-14 96 goto fail;
dea3101e0a5c89 James Bottomley 2005-04-17 97
6da2ec56059c3c Kees Cook 2018-06-12 98 pool->elements = kmalloc_array(LPFC_MBUF_POOL_SIZE,
6da2ec56059c3c Kees Cook 2018-06-12 99 sizeof(struct lpfc_dmabuf),
6da2ec56059c3c Kees Cook 2018-06-12 100 GFP_KERNEL);
a96e0c7798057d Mariusz Kozlowski 2007-01-02 101 if (!pool->elements)
a96e0c7798057d Mariusz Kozlowski 2007-01-02 102 goto fail_free_lpfc_mbuf_pool;
a96e0c7798057d Mariusz Kozlowski 2007-01-02 103
dea3101e0a5c89 James Bottomley 2005-04-17 104 pool->max_count = 0;
dea3101e0a5c89 James Bottomley 2005-04-17 105 pool->current_count = 0;
dea3101e0a5c89 James Bottomley 2005-04-17 106 for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) {
771db5c0e3f5da Romain Perier 2017-07-06 @107 pool->elements[i].virt = dma_pool_alloc(phba->lpfc_mbuf_pool,
dea3101e0a5c89 James Bottomley 2005-04-17 108 GFP_KERNEL, &pool->elements[i].phys);
dea3101e0a5c89 James Bottomley 2005-04-17 109 if (!pool->elements[i].virt)
dea3101e0a5c89 James Bottomley 2005-04-17 110 goto fail_free_mbuf_pool;
dea3101e0a5c89 James Bottomley 2005-04-17 111 pool->max_count++;
dea3101e0a5c89 James Bottomley 2005-04-17 112 pool->current_count++;
dea3101e0a5c89 James Bottomley 2005-04-17 113 }
dea3101e0a5c89 James Bottomley 2005-04-17 114
e7dab164a9aa45 James Smart 2020-10-20 115 phba->mbox_mem_pool = mempool_create_kmalloc_pool(LPFC_MBX_POOL_SIZE,
0eaae62abaa1ad Matthew Dobson 2006-03-26 116 sizeof(LPFC_MBOXQ_t));
dea3101e0a5c89 James Bottomley 2005-04-17 117 if (!phba->mbox_mem_pool)
dea3101e0a5c89 James Bottomley 2005-04-17 118 goto fail_free_mbuf_pool;
dea3101e0a5c89 James Bottomley 2005-04-17 119
0eaae62abaa1ad Matthew Dobson 2006-03-26 120 phba->nlp_mem_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE,
0eaae62abaa1ad Matthew Dobson 2006-03-26 121 sizeof(struct lpfc_nodelist));
dea3101e0a5c89 James Bottomley 2005-04-17 122 if (!phba->nlp_mem_pool)
dea3101e0a5c89 James Bottomley 2005-04-17 123 goto fail_free_mbox_pool;
8568a4d2495ebc James Smart 2009-07-19 124
8568a4d2495ebc James Smart 2009-07-19 125 if (phba->sli_rev == LPFC_SLI_REV4) {
19ca760979e4be James Smart 2010-11-20 126 phba->rrq_pool =
9dace1fa91ca41 Dick Kennedy 2020-06-30 127 mempool_create_kmalloc_pool(LPFC_RRQ_POOL_SIZE,
19ca760979e4be James Smart 2010-11-20 128 sizeof(struct lpfc_node_rrq));
19ca760979e4be James Smart 2010-11-20 129 if (!phba->rrq_pool)
19ca760979e4be James Smart 2010-11-20 130 goto fail_free_nlp_mem_pool;
771db5c0e3f5da Romain Perier 2017-07-06 131 phba->lpfc_hrb_pool = dma_pool_create("lpfc_hrb_pool",
771db5c0e3f5da Romain Perier 2017-07-06 132 &phba->pcidev->dev,
da0436e915a5c1 James Smart 2009-05-22 133 LPFC_HDR_BUF_SIZE, align, 0);
da0436e915a5c1 James Smart 2009-05-22 134 if (!phba->lpfc_hrb_pool)
19ca760979e4be James Smart 2010-11-20 135 goto fail_free_rrq_mem_pool;
8568a4d2495ebc James Smart 2009-07-19 136
771db5c0e3f5da Romain Perier 2017-07-06 137 phba->lpfc_drb_pool = dma_pool_create("lpfc_drb_pool",
771db5c0e3f5da Romain Perier 2017-07-06 138 &phba->pcidev->dev,
da0436e915a5c1 James Smart 2009-05-22 139 LPFC_DATA_BUF_SIZE, align, 0);
da0436e915a5c1 James Smart 2009-05-22 140 if (!phba->lpfc_drb_pool)
8568a4d2495ebc James Smart 2009-07-19 141 goto fail_free_hrb_pool;
8568a4d2495ebc James Smart 2009-07-19 142 phba->lpfc_hbq_pool = NULL;
8568a4d2495ebc James Smart 2009-07-19 143 } else {
771db5c0e3f5da Romain Perier 2017-07-06 144 phba->lpfc_hbq_pool = dma_pool_create("lpfc_hbq_pool",
771db5c0e3f5da Romain Perier 2017-07-06 145 &phba->pcidev->dev, LPFC_BPL_SIZE, align, 0);
8568a4d2495ebc James Smart 2009-07-19 146 if (!phba->lpfc_hbq_pool)
8568a4d2495ebc James Smart 2009-07-19 147 goto fail_free_nlp_mem_pool;
8568a4d2495ebc James Smart 2009-07-19 148 phba->lpfc_hrb_pool = NULL;
8568a4d2495ebc James Smart 2009-07-19 149 phba->lpfc_drb_pool = NULL;
8568a4d2495ebc James Smart 2009-07-19 150 }
92d7f7b0cde3ad James Smart 2007-06-17 151
1ba981fd3ad1f9 James Smart 2014-02-20 152 if (phba->cfg_EnableXLane) {
1ba981fd3ad1f9 James Smart 2014-02-20 153 phba->device_data_mem_pool = mempool_create_kmalloc_pool(
1ba981fd3ad1f9 James Smart 2014-02-20 154 LPFC_DEVICE_DATA_POOL_SIZE,
1ba981fd3ad1f9 James Smart 2014-02-20 155 sizeof(struct lpfc_device_data));
1ba981fd3ad1f9 James Smart 2014-02-20 156 if (!phba->device_data_mem_pool)
895427bd012ce5 James Smart 2017-02-12 157 goto fail_free_drb_pool;
1ba981fd3ad1f9 James Smart 2014-02-20 158 } else {
1ba981fd3ad1f9 James Smart 2014-02-20 159 phba->device_data_mem_pool = NULL;
1ba981fd3ad1f9 James Smart 2014-02-20 160 }
1ba981fd3ad1f9 James Smart 2014-02-20 161
dea3101e0a5c89 James Bottomley 2005-04-17 162 return 0;
895427bd012ce5 James Smart 2017-02-12 163 fail_free_drb_pool:
771db5c0e3f5da Romain Perier 2017-07-06 @164 dma_pool_destroy(phba->lpfc_drb_pool);
895427bd012ce5 James Smart 2017-02-12 165 phba->lpfc_drb_pool = NULL;
8568a4d2495ebc James Smart 2009-07-19 166 fail_free_hrb_pool:
771db5c0e3f5da Romain Perier 2017-07-06 167 dma_pool_destroy(phba->lpfc_hrb_pool);
da0436e915a5c1 James Smart 2009-05-22 168 phba->lpfc_hrb_pool = NULL;
19ca760979e4be James Smart 2010-11-20 169 fail_free_rrq_mem_pool:
19ca760979e4be James Smart 2010-11-20 170 mempool_destroy(phba->rrq_pool);
19ca760979e4be James Smart 2010-11-20 171 phba->rrq_pool = NULL;
ed957684294618 James Smart 2007-06-17 172 fail_free_nlp_mem_pool:
ed957684294618 James Smart 2007-06-17 173 mempool_destroy(phba->nlp_mem_pool);
ed957684294618 James Smart 2007-06-17 174 phba->nlp_mem_pool = NULL;
dea3101e0a5c89 James Bottomley 2005-04-17 175 fail_free_mbox_pool:
dea3101e0a5c89 James Bottomley 2005-04-17 176 mempool_destroy(phba->mbox_mem_pool);
2e0fef85e098f6 James Smart 2007-06-17 177 phba->mbox_mem_pool = NULL;
dea3101e0a5c89 James Bottomley 2005-04-17 178 fail_free_mbuf_pool:
a96e0c7798057d Mariusz Kozlowski 2007-01-02 179 while (i--)
771db5c0e3f5da Romain Perier 2017-07-06 @180 dma_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt,
dea3101e0a5c89 James Bottomley 2005-04-17 181 pool->elements[i].phys);
dea3101e0a5c89 James Bottomley 2005-04-17 182 kfree(pool->elements);
a96e0c7798057d Mariusz Kozlowski 2007-01-02 183 fail_free_lpfc_mbuf_pool:
771db5c0e3f5da Romain Perier 2017-07-06 184 dma_pool_destroy(phba->lpfc_mbuf_pool);
2e0fef85e098f6 James Smart 2007-06-17 185 phba->lpfc_mbuf_pool = NULL;
dea3101e0a5c89 James Bottomley 2005-04-17 186 fail:
dea3101e0a5c89 James Bottomley 2005-04-17 187 return -ENOMEM;
dea3101e0a5c89 James Bottomley 2005-04-17 188 }
dea3101e0a5c89 James Bottomley 2005-04-17 189
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33521 bytes)
Powered by blists - more mailing lists