From: Niklas Cassel <cassel@kernel.org>
To: "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>,
linux-pci@vger.kernel.org
Subject: [PATCH v2 3/4] PCI: endpoint: pci-epf-test: remove superfluous checks
Date: Wed, 7 Feb 2024 22:39:16 +0100 [thread overview]
Message-ID: <20240207213922.1796533-4-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-test.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index 15bfa7d83489..981894e40681 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -841,12 +841,6 @@ static int pci_epf_test_alloc_space(struct pci_epf *epf)
}
test_reg_size = test_reg_bar_size + msix_table_size + pba_size;
- if (epc_features->bar_fixed_size[test_reg_bar]) {
- if (test_reg_size > bar_size[test_reg_bar])
- return -ENOMEM;
- test_reg_size = bar_size[test_reg_bar];
- }
-
base = pci_epf_alloc_space(epf, test_reg_size, test_reg_bar,
epc_features, PRIMARY_INTERFACE);
if (!base) {
@@ -888,8 +882,6 @@ static void pci_epf_configure_bar(struct pci_epf *epf,
bar_fixed_64bit = !!(epc_features->bar_fixed_64bit & (1 << i));
if (bar_fixed_64bit)
epf_bar->flags |= PCI_BASE_ADDRESS_MEM_TYPE_64;
- if (epc_features->bar_fixed_size[i])
- bar_size[i] = epc_features->bar_fixed_size[i];
}
}
--
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 ` Niklas Cassel [this message]
2024-02-09 8:38 ` [PATCH v2 3/4] PCI: endpoint: pci-epf-test: remove superfluous checks Manivannan Sadhasivam
2024-02-07 21:39 ` [PATCH v2 4/4] PCI: endpoint: pci-epf-vntb: " Niklas Cassel
2024-02-09 8:40 ` 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-4-cassel@kernel.org \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=dlemoal@kernel.org \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.