mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
PCI: endpoint: pci-epf-vntb: Remove superfluous checks for pci_epf_alloc_space() API
Now that the checks are performed by the pci_epf_alloc_space() API, let's remove the superfluous checks in this driver. Signed-off-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20240207213922.1796533-5-cassel@kernel.org [mani: reworded the commit message] Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
parent
fda826b15c
commit
c795fd3f36
1 changed files with 0 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue