Skip to content

Commit c795fd3

Browse files
floatiousMani-Sadhasivam
authored andcommitted
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 <[email protected]> Reviewed-by: Frank Li <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mani: reworded the commit message] Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent fda826b commit c795fd3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb)
527527
static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
528528
{
529529
const struct pci_epc_features *epc_features;
530-
u32 align;
531530
struct device *dev = &ntb->epf->dev;
532531
int ret;
533532
struct pci_epf_bar *epf_bar;
@@ -538,16 +537,6 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
538537
epc_features = pci_epc_get_features(ntb->epf->epc,
539538
ntb->epf->func_no,
540539
ntb->epf->vfunc_no);
541-
align = epc_features->align;
542-
543-
if (size < 128)
544-
size = 128;
545-
546-
if (align)
547-
size = ALIGN(size, align);
548-
else
549-
size = roundup_pow_of_two(size);
550-
551540
barno = ntb->epf_ntb_bar[BAR_DB];
552541

553542
mw_addr = pci_epf_alloc_space(ntb->epf, size, barno, epc_features, 0);

0 commit comments

Comments
 (0)