From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1958158020856515874==" MIME-Version: 1.0 From: Zhou Wang To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH] dmaengine: hisilicon: Add Kunpeng DMA engine support Date: Mon, 25 Nov 2019 11:09:39 +0800 Message-ID: <5DDB45F3.2070806@hisilicon.com> In-Reply-To: <201911242336.W7Py5cLy%lkp@intel.com> List-Id: --===============1958158020856515874== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2019/11/24 23:49, kbuild test robot wrote: > Hi Zhou, I am not sure if this email will be replied :) > = > [FYI, it's a private test report for your RFC patch.] > [auto build test ERROR on linus/master] > [also build test ERROR on v5.4-rc8 next-20191122] > [cannot apply to slave-dma/next] Thanks, will rebase on maintainer's branch in next verion. > [if your patch is applied to the wrong git tree, please drop us a note to= help > improve the system. BTW, we also suggest to use '--base' option to specif= y the > base tree in git format-patch, please see https://stackoverflow.com/a/374= 06982] > = > url: https://github.com/0day-ci/linux/commits/Zhou-Wang/dmaengine-hisi= licon-Add-Kunpeng-DMA-engine-support/20191124-185003 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t 6b8a794678763130b7e7d049985008641dc494e8 > config: sh-allmodconfig (attached as .config) > compiler: sh4-linux-gcc (GCC) 7.4.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=3D7.4.0 make.cross ARCH=3Dsh = > = > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > = > All error/warnings (new ones prefixed by >>): > = > drivers//dma/hisi_dma.c: In function 'hisi_dma_probe': >>> drivers//dma/hisi_dma.c:495:8: error: implicit declaration of function = 'pcim_enable_device'; did you mean 'pci_enable_device'? [-Werror=3Dimplicit= -function-declaration] > ret =3D pcim_enable_device(pdev); it is pcim_enable_device, which is defined in drivers/pci/pci.c and export = outside. > ^~~~~~~~~~~~~~~~~~ > pci_enable_device > drivers//dma/hisi_dma.c: At top level: >>> drivers//dma/hisi_dma.c:579:1: warning: data definition has no type or = storage class > module_pci_driver(hisi_dma_pci_driver); > ^~~~~~~~~~~~~~~~~ >>> drivers//dma/hisi_dma.c:579:1: error: type defaults to 'int' in declara= tion of 'module_pci_driver' [-Werror=3Dimplicit-int] >>> drivers//dma/hisi_dma.c:579:1: warning: parameter names (without types)= in function declaration > drivers//dma/hisi_dma.c:573:26: warning: 'hisi_dma_pci_driver' defined= but not used [-Wunused-variable] > static struct pci_driver hisi_dma_pci_driver =3D { > ^~~~~~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors Just copy the ways in other drivers, not sure that is the wrong here? > = > vim +495 drivers//dma/hisi_dma.c > = > 486 = > 487 static int hisi_dma_probe(struct pci_dev *pdev, const struct pci_d= evice_id *id) > 488 { > 489 struct device *dev =3D &pdev->dev; > 490 struct hisi_dma_dev *hdma_dev; > 491 struct dma_device *dma_dev; > 492 size_t dev_size; > 493 int ret; > 494 = > > 495 ret =3D pcim_enable_device(pdev); > 496 if (ret) { > 497 dev_err(dev, "failed to enable device mem!\n"); > 498 return ret; > 499 } > 500 = > 501 ret =3D pcim_iomap_regions(pdev, 1 << PCI_BAR_2, pci_name(pdev)); > 502 if (ret) { > 503 dev_err(dev, "failed to remap I/O region!\n"); > 504 return ret; > 505 } > 506 = > 507 ret =3D pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); > 508 if (ret) > 509 return ret; > 510 = > 511 ret =3D pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); > 512 if (ret) > 513 return ret; > 514 = > 515 dev_size =3D sizeof(struct hisi_dma_chan) * HISI_DMA_CHAN_NUM + > 516 sizeof(*hdma_dev); > 517 hdma_dev =3D devm_kzalloc(dev, dev_size, GFP_KERNEL); > 518 if (!hdma_dev) > 519 return -EINVAL; > 520 = > 521 hdma_dev->base =3D pcim_iomap_table(pdev)[PCI_BAR_2]; > 522 hdma_dev->pdev =3D pdev; > 523 hdma_dev->chan_num =3D HISI_DMA_CHAN_NUM; > 524 hdma_dev->chan_depth =3D HISI_DMA_Q_DEPTH_VAL; > 525 = > 526 pci_set_drvdata(pdev, hdma_dev); > 527 pci_set_master(pdev); > 528 = > 529 ret =3D pci_alloc_irq_vectors(pdev, HISI_DMA_MSI_NUM, HISI_DMA_MS= I_NUM, > 530 PCI_IRQ_MSI); > 531 if (ret < 0) { > 532 dev_err(dev, "Failed to allocate MSI vectors!\n"); > 533 return ret; > 534 } > 535 = > 536 dma_dev =3D &hdma_dev->dma_dev; > 537 dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); > 538 dma_dev->device_free_chan_resources =3D hisi_dma_free_chan_resour= ces; > 539 dma_dev->device_prep_dma_memcpy =3D hisi_dma_prep_dma_memcpy; > 540 dma_dev->device_tx_status =3D hisi_dma_tx_status; > 541 dma_dev->device_issue_pending =3D hisi_dma_issue_pending; > 542 dma_dev->device_terminate_all =3D hisi_dma_terminate_all; > 543 dma_dev->device_synchronize =3D hisi_dma_synchronize; > 544 dma_dev->directions =3D BIT(DMA_MEM_TO_MEM); > 545 dma_dev->dev =3D dev; > 546 INIT_LIST_HEAD(&dma_dev->channels); > 547 = > 548 hisi_dma_set_mode(hdma_dev, RC); > 549 = > 550 ret =3D hisi_dma_enable_hw_channels(hdma_dev); > 551 if (ret < 0) { > 552 dev_err(dev, "failed to enable hw channel!\n"); > 553 return ret; > 554 } > 555 = > 556 ret =3D devm_add_action_or_reset(dev, hisi_dma_disable_hw_channel= s, > 557 hdma_dev); > 558 if (ret) > 559 return ret; > 560 = > 561 ret =3D dmaenginem_async_device_register(dma_dev); > 562 if (ret < 0) > 563 dev_err(dev, "failed to register device!\n"); > 564 = > 565 return ret; > 566 } > 567 = > 568 static const struct pci_device_id hisi_dma_pci_tbl[] =3D { > 569 { PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, PCI_DEVICE_ID_HISI_DMA) }, > 570 { 0, } > 571 }; > 572 = > 573 static struct pci_driver hisi_dma_pci_driver =3D { > 574 .name =3D "hisi_dma", > 575 .id_table =3D hisi_dma_pci_tbl, > 576 .probe =3D hisi_dma_probe, > 577 }; > 578 = > > 579 module_pci_driver(hisi_dma_pci_driver); > 580 = > = > --- > 0-DAY kernel test infrastructure Open Source Technology C= enter > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corp= oration >=20 --===============1958158020856515874==--