[PATCH 2/2] misc: pci_endpoint_test: remove dead BAR read before doorbell trigger
From: carlos . bilbao
Date: Fri Apr 03 2026 - 21:21:20 EST
From: Carlos Bilbao <carlos.bilbao@xxxxxxxxxx>
The assignment before the writel sequence is dead code (bar is
unconditionally overwritten by the re-read immediately after) so remove the
call 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@xxxxxxxxxx>
---
drivers/misc/pci_endpoint_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 276bed3f1c18..07c5f19d5c5a 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -1081,7 +1081,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);
--
2.43.0