public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: "Carlos Bilbao (Lambda)" <carlos.bilbao@kernel.org>
To: mani@kernel.org, kwilczynski@kernel.org, kishon@kernel.org,
	den@valinux.co.jp
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	bilbao@vt.edu, Carlos Bilbao <carlos.bilbao@kernel.org>
Subject: [PATCH v2 2/2] misc: pci_endpoint_test: remove dead BAR read before doorbell trigger
Date: Fri, 10 Apr 2026 16:03:00 -0700	[thread overview]
Message-ID: <20260410230300.135631-3-carlos.bilbao@kernel.org> (raw)
In-Reply-To: <20260410230300.135631-1-carlos.bilbao@kernel.org>

From: Carlos Bilbao <carlos.bilbao@kernel.org>

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@kernel.org>
Reviewed-by: Koichiro Den <den@valinux.co.jp>
---
 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 0d0b430de0e8..7affab786ae4 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


      parent reply	other threads:[~2026-04-10 23:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 23:02 [PATCH v2 0/2] misc: pci_endpoint_test: doorbell BAR validation fixes Carlos Bilbao (Lambda)
2026-04-10 23:02 ` [PATCH v2 1/2] misc: pci_endpoint_test: validate BAR index in doorbell test Carlos Bilbao (Lambda)
2026-04-10 23:03 ` Carlos Bilbao (Lambda) [this message]

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=20260410230300.135631-3-carlos.bilbao@kernel.org \
    --to=carlos.bilbao@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bilbao@vt.edu \
    --cc=den@valinux.co.jp \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mani@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