From: Ilpo Järvinen Date: Tue, 24 Mar 2026 16:56:27 +0000 (+0200) Subject: ARM/PCI: Remove unnecessary second application of align X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0734cb2412f5fdc06fac6c1e6f3046085a4fdf23;p=thirdparty%2Fkernel%2Fstable.git ARM/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 Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260324165633.4583-5-ilpo.jarvinen@linux.intel.com --- diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 5b9b4fcd0e54..cedb83a85dd9 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -571,8 +571,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, if (res->flags & IORESOURCE_IO && start & 0x300) start = (start + 0x3ff) & ~0x3ff; - start = (start + align - 1) & ~(align - 1); - host_bridge = pci_find_host_bridge(dev->bus); if (host_bridge->align_resource)