public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Koichiro Den <den@valinux.co.jp>,
	vkoul@kernel.org, mani@kernel.org, Frank.Li@nxp.com,
	jingoohan1@gmail.com, lpieralisi@kernel.org,
	kwilczynski@kernel.org, robh@kernel.org, bhelgaas@google.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dmaengine@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 7/9] PCI: endpoint: pci-epf-test: Add embedded doorbell variant
Date: Sun, 8 Feb 2026 20:35:19 +0800	[thread overview]
Message-ID: <202602082040.oSU5mO1p-lkp@intel.com> (raw)
In-Reply-To: <20260206172646.1556847-8-den@valinux.co.jp>

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@intel.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

  parent reply	other threads:[~2026-02-08 12:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-06 17:26 [PATCH v4 0/9] dmaengine, PCI: endpoint: Enable remote use of integrated DesignWare eDMA Koichiro Den
2026-02-06 17:26 ` [PATCH v4 1/9] dmaengine: dw-edma: Add per-channel interrupt routing control Koichiro Den
2026-02-06 17:43   ` Frank Li
2026-02-09  4:06     ` Koichiro Den
2026-02-06 17:26 ` [PATCH v4 2/9] dmaengine: dw-edma: Deassert emulated interrupts in the IRQ handler Koichiro Den
2026-02-06 17:26 ` [PATCH v4 3/9] dmaengine: dw-edma: Export per-channel IRQ and doorbell register offset Koichiro Den
2026-02-06 17:56   ` Frank Li
2026-02-09  4:14     ` Koichiro Den
2026-02-08  8:57   ` kernel test robot
2026-02-06 17:26 ` [PATCH v4 4/9] PCI: endpoint: Add remote resource query API Koichiro Den
2026-02-06 18:01   ` Frank Li
2026-02-07 16:39     ` Koichiro Den
2026-02-10 12:20       ` Niklas Cassel
2026-02-10 14:18         ` Koichiro Den
2026-02-06 17:26 ` [PATCH v4 5/9] PCI: dwc: Record integrated eDMA register window Koichiro Den
2026-02-06 17:26 ` [PATCH v4 6/9] PCI: dwc: ep: Report integrated eDMA resources via EPC remote-resource API Koichiro Den
2026-02-06 18:06   ` Frank Li
2026-02-07 15:59     ` Koichiro Den
2026-02-06 17:26 ` [PATCH v4 7/9] PCI: endpoint: pci-epf-test: Add embedded doorbell variant Koichiro Den
2026-02-06 19:20   ` Frank Li
2026-02-07 16:25     ` Koichiro Den
2026-02-08 12:35   ` kernel test robot [this message]
2026-02-06 17:26 ` [PATCH v4 8/9] misc: pci_endpoint_test: Allow selecting embedded doorbell Koichiro Den
2026-02-06 17:26 ` [PATCH v4 9/9] selftests: pci_endpoint: Exercise MSI and " Koichiro Den

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=202602082040.oSU5mO1p-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=den@valinux.co.jp \
    --cc=dmaengine@vger.kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /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