]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
misc: pci_endpoint_test: Remove dead BAR read before doorbell trigger
authorCarlos Bilbao <carlos.bilbao@kernel.org>
Fri, 10 Apr 2026 23:03:00 +0000 (16:03 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 22 Jun 2026 20:23:12 +0000 (15:23 -0500)
The assignment before the writel sequence is dead code (bar is
unconditionally overwritten by the re-read immediately after) so remove the
assignment entirely.

Note that the DB_BAR register is a plain value written by the endpoint
firmware; reading it carries no side effect.

Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Koichiro Den <den@valinux.co.jp>
Link: https://patch.msgid.link/20260410230300.135631-3-carlos.bilbao@kernel.org
drivers/misc/pci_endpoint_test.c

index 64ac7c7c90af9bd75ac3b89d06c18ecdaa642219..3635741c3e7a7194feddb1c2d8d598704a58695e 100644 (file)
@@ -1100,7 +1100,6 @@ static int pci_endpoint_test_doorbell(struct pci_endpoint_test *test)
 
        data = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_DATA);
        addr = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_OFFSET);
-       bar = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_DB_BAR);
 
        pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_TYPE, irq_type);
        pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_NUMBER, 1);