Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

MIPS: PCI: Remove unnecessary second application of align

Aligning res->start by align inside pcibios_align_resource() is unnecessary
because caller of pcibios_align_resource() is __find_resource_space() that
aligns res->start with align before calling pcibios_align_resource().

Aligning by align in case of IORESOURCE_IO && start & 0x300 cannot ever
result in changing start either because 0x300 bits would have not survived
the earlier alignment if align was large enough to have an impact.

Thus, remove the duplicated aligning from pcibios_align_resource().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260324165633.4583-7-ilpo.jarvinen@linux.intel.com

authored by

Ilpo Järvinen and committed by
Bjorn Helgaas
3fa40d30 4dd6e1aa

-2
-2
arch/mips/pci/pci-generic.c
··· 32 32 if (res->flags & IORESOURCE_IO && start & 0x300) 33 33 start = (start + 0x3ff) & ~0x3ff; 34 34 35 - start = (start + align - 1) & ~(align - 1); 36 - 37 35 host_bridge = pci_find_host_bridge(dev->bus); 38 36 39 37 if (host_bridge->align_resource)