From: Niklas Cassel <cassel@kernel.org>
To: "Jon Mason" <jdmason@kudzu.us>,
"Dave Jiang" <dave.jiang@intel.com>,
"Allen Hubbe" <allenbh@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>
Cc: Damien Le Moal <dlemoal@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Niklas Cassel <cassel@kernel.org>,
ntb@lists.linux.dev, linux-pci@vger.kernel.org
Subject: [PATCH v2 4/4] PCI: endpoint: pci-epf-vntb: remove superfluous checks
Date: Wed, 7 Feb 2024 22:39:17 +0100 [thread overview]
Message-ID: <20240207213922.1796533-5-cassel@kernel.org> (raw)
In-Reply-To: <20240207213922.1796533-1-cassel@kernel.org>
Remove superfluous alignment checks, these checks are already done by
pci_epf_alloc_space().
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-vntb.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index ba509d67188b..eda4b906868b 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -527,7 +527,6 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb)
static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
{
const struct pci_epc_features *epc_features;
- u32 align;
struct device *dev = &ntb->epf->dev;
int ret;
struct pci_epf_bar *epf_bar;
@@ -538,16 +537,6 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
epc_features = pci_epc_get_features(ntb->epf->epc,
ntb->epf->func_no,
ntb->epf->vfunc_no);
- align = epc_features->align;
-
- if (size < 128)
- size = 128;
-
- if (align)
- size = ALIGN(size, align);
- else
- size = roundup_pow_of_two(size);
-
barno = ntb->epf_ntb_bar[BAR_DB];
mw_addr = pci_epf_alloc_space(ntb->epf, size, barno, epc_features, 0);
--
2.43.0
next prev parent reply other threads:[~2024-02-07 21:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 21:39 [PATCH v2 0/4] pci_epf_alloc_space() cleanups Niklas Cassel
2024-02-07 21:39 ` [PATCH v2 1/4] PCI: endpoint: refactor pci_epf_alloc_space() Niklas Cassel
2024-02-07 21:39 ` [PATCH v2 2/4] PCI: endpoint: improve pci_epf_alloc_space() Niklas Cassel
2024-02-09 8:37 ` Manivannan Sadhasivam
2024-02-07 21:39 ` [PATCH v2 3/4] PCI: endpoint: pci-epf-test: remove superfluous checks Niklas Cassel
2024-02-09 8:38 ` Manivannan Sadhasivam
2024-02-07 21:39 ` Niklas Cassel [this message]
2024-02-09 8:40 ` [PATCH v2 4/4] PCI: endpoint: pci-epf-vntb: " Manivannan Sadhasivam
2024-02-07 22:23 ` [PATCH v2 0/4] pci_epf_alloc_space() cleanups Frank Li
2024-02-09 8:51 ` Manivannan Sadhasivam
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=20240207213922.1796533-5-cassel@kernel.org \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=dlemoal@kernel.org \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=ntb@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).