[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202602082040.oSU5mO1p-lkp@intel.com>
Date: Sun, 8 Feb 2026 20:35:19 +0800
From: kernel test robot <lkp@...el.com>
To: Koichiro Den <den@...inux.co.jp>, vkoul@...nel.org, mani@...nel.org,
Frank.Li@....com, jingoohan1@...il.com, lpieralisi@...nel.org,
kwilczynski@...nel.org, robh@...nel.org, bhelgaas@...gle.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
dmaengine@...r.kernel.org, linux-pci@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 7/9] PCI: endpoint: pci-epf-test: Add embedded
doorbell variant
Hi Koichiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on pci/next]
[also build test ERROR on next-20260205]
[cannot apply to vkoul-dmaengine/next pci/for-linus linus/master v6.19-rc8]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Koichiro-Den/dmaengine-dw-edma-Add-per-channel-interrupt-routing-control/20260207-013042
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20260206172646.1556847-8-den%40valinux.co.jp
patch subject: [PATCH v4 7/9] PCI: endpoint: pci-epf-test: Add embedded doorbell variant
config: um-randconfig-002-20260208 (https://download.01.org/0day-ci/archive/20260208/202602082040.oSU5mO1p-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260208/202602082040.oSU5mO1p-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602082040.oSU5mO1p-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/pci/endpoint/functions/pci-epf-test.c:12:
In file included from include/linux/dmaengine.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/um/include/asm/io.h:24:
include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
1209 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
| ~~~~~~~~~~ ^
>> drivers/pci/endpoint/functions/pci-epf-test.c:858:3: error: cannot jump from this goto statement to its label
858 | goto set_status_err;
| ^
drivers/pci/endpoint/functions/pci-epf-test.c:861:34: note: jump bypasses initialization of variable with __attribute__((cleanup))
861 | struct pci_epc_remote_resource *resources __free(kfree) =
| ^
1 warning and 1 error generated.
vim +858 drivers/pci/endpoint/functions/pci-epf-test.c
838
839 static void pci_epf_test_enable_doorbell_embedded(struct pci_epf_test *epf_test,
840 struct pci_epf_test_reg *reg)
841 {
842 struct pci_epc_remote_resource *dma_ctrl = NULL, *chan0 = NULL;
843 const char *irq_name = "pci-ep-test-doorbell-embedded";
844 u32 status = le32_to_cpu(reg->status);
845 struct pci_epf *epf = epf_test->epf;
846 struct pci_epc *epc = epf->epc;
847 struct device *dev = &epf->dev;
848 enum pci_barno bar;
849 size_t align_off;
850 unsigned int i;
851 int cnt, ret;
852 u32 db_off;
853
854 cnt = pci_epc_get_remote_resources(epc, epf->func_no, epf->vfunc_no,
855 NULL, 0);
856 if (cnt <= 0) {
857 dev_err(dev, "No remote resources available for embedded doorbell\n");
> 858 goto set_status_err;
859 }
860
861 struct pci_epc_remote_resource *resources __free(kfree) =
862 kcalloc(cnt, sizeof(*resources), GFP_KERNEL);
863 if (!resources)
864 goto set_status_err;
865
866 ret = pci_epc_get_remote_resources(epc, epf->func_no, epf->vfunc_no,
867 resources, cnt);
868 if (ret < 0) {
869 dev_err(dev, "Failed to get remote resources: %d\n", ret);
870 goto set_status_err;
871 }
872 cnt = ret;
873
874 for (i = 0; i < cnt; i++) {
875 if (resources[i].type == PCI_EPC_RR_DMA_CTRL_MMIO)
876 dma_ctrl = &resources[i];
877 else if (resources[i].type == PCI_EPC_RR_DMA_CHAN_DESC &&
878 !chan0)
879 chan0 = &resources[i];
880 }
881
882 if (!dma_ctrl || !chan0) {
883 dev_err(dev, "Missing DMA ctrl MMIO or channel #0 info\n");
884 goto set_status_err;
885 }
886
887 bar = pci_epc_get_next_free_bar(epf_test->epc_features,
888 epf_test->test_reg_bar + 1);
889 if (bar < BAR_0) {
890 dev_err(dev, "No free BAR for embedded doorbell\n");
891 goto set_status_err;
892 }
893
894 ret = pci_epf_align_inbound_addr(epf, bar, dma_ctrl->phys_addr,
895 &epf_test->db_bar.phys_addr,
896 &align_off);
897 if (ret)
898 goto set_status_err;
899
900 db_off = chan0->u.dma_chan_desc.db_offset;
901 if (db_off >= dma_ctrl->size ||
902 align_off + db_off >= epf->bar[bar].size) {
903 dev_err(dev, "BAR%d too small for embedded doorbell (off %#zx + %#x)\n",
904 bar, align_off, db_off);
905 goto set_status_err;
906 }
907
908 epf_test->db_variant = PCI_EPF_TEST_DB_EMBEDDED;
909
910 ret = request_irq(chan0->u.dma_chan_desc.irq,
911 pci_epf_test_doorbell_embedded_irq_handler,
912 IRQF_SHARED, irq_name, epf_test);
913 if (ret) {
914 dev_err(dev, "Failed to request embedded doorbell IRQ: %d\n",
915 chan0->u.dma_chan_desc.irq);
916 goto err_cleanup;
917 }
918 epf_test->db_irq = chan0->u.dma_chan_desc.irq;
919
920 reg->doorbell_data = cpu_to_le32(0);
921 reg->doorbell_bar = cpu_to_le32(bar);
922 reg->doorbell_offset = cpu_to_le32(align_off + db_off);
923
924 epf_test->db_bar.barno = bar;
925 epf_test->db_bar.size = epf->bar[bar].size;
926 epf_test->db_bar.flags = epf->bar[bar].flags;
927
928 ret = pci_epc_set_bar(epc, epf->func_no, epf->vfunc_no, &epf_test->db_bar);
929 if (ret)
930 goto err_cleanup;
931
932 status |= STATUS_DOORBELL_ENABLE_SUCCESS;
933 reg->status = cpu_to_le32(status);
934 return;
935
936 err_cleanup:
937 pci_epf_test_doorbell_cleanup(epf_test);
938 set_status_err:
939 status |= STATUS_DOORBELL_ENABLE_FAIL;
940 reg->status = cpu_to_le32(status);
941 }
942
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists