From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69A7333DEFE; Fri, 27 Mar 2026 02:56:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774580166; cv=none; b=PYppQGzQakaZvb5XWfx246yOneNOlAL8md37/l9d94+CyEK9+5RjMJgLO2TG/kMscSEuwHwpTrNXJDG4BbxN7ozcPVDHphHm24/SUQch9gisKh+j1DyKDV2Sq/t6faGQEsnbPlaX+xQhNP0aa171i0MMjMV26WScxxI0aSdMfZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774580166; c=relaxed/simple; bh=OXABB1eFjeN1oGH/SXFHZZT4FCIkSR1xm49zyhunO7w=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=mL6oPjZ6AV+g3fkAf9SZCzXneiKUUjWFVQz58U87NpDv7XBvPVHCKNOHPf/08i0XS8inf7tWC62+cJqUlB1RdL47O/nyrRqYb9pjCpWJ6kPVMguhXeqYD5nmaDsRpqDGV8+ooT/tcUHcSQbhPwczO7hsMW1ClEOCeLMuInIHzYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62989C116C6; Fri, 27 Mar 2026 02:55:59 +0000 (UTC) Message-ID: Date: Fri, 27 Mar 2026 12:55:55 +1000 Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 05/10] am68k/PCI: Remove unnecessary second application of align To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , linux-pci@vger.kernel.org, Bjorn Helgaas , Guenter Roeck , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Geert Uytterhoeven , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Chris Zankel , Max Filippov , Madhavan Srinivasan , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-kernel@vger.kernel.org References: <20260324165633.4583-1-ilpo.jarvinen@linux.intel.com> <20260324165633.4583-6-ilpo.jarvinen@linux.intel.com> Content-Language: en-US From: Greg Ungerer In-Reply-To: <20260324165633.4583-6-ilpo.jarvinen@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 25/3/26 02:56, Ilpo Järvinen wrote: > 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 LGTM. Acked-by: Greg Ungerer > --- > arch/m68k/kernel/pcibios.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/m68k/kernel/pcibios.c b/arch/m68k/kernel/pcibios.c > index 1415f6e4e5ce..7e286ee1976b 100644 > --- a/arch/m68k/kernel/pcibios.c > +++ b/arch/m68k/kernel/pcibios.c > @@ -36,8 +36,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); > - > return start; > } >