From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0C6A34317D for ; Sun, 14 Jun 2026 09:20:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781428846; cv=none; b=mTE2Q1cEqYV/tuj+xWNAaIUV4NDkz1D7MiuV9bNpRkpTuytbajSlZARQT8aH1mKsFr0CcTtfUo7SeUzNgxMvY5KF+XBOoD7IXjRhx54V24XzVV5SpBdX+c3WzFK4LijQl2fvlthigkG74Sz5rOnsFWuGAdGumvEl78gCeTP0uiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781428846; c=relaxed/simple; bh=6l37RYbSH1qBlvS379nwLWQvm9p0N17M+PP/FWJ/zTM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t1fz8VyK97/VbFQ2sN4e3/0MY/vMDFNiW5gtEd69C+8C4g7Mt01C8f+Z0Og9edBG34qFluUNifIDfT36daYHQLErEMKk+WgckBqiKart3qHrIzMDZso6E6z5RypBGAHc/OVdiajvBm8dSUqUVYTJGNIP44D+9C1zIqPZUAO5aeQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jd0ax0pZ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jd0ax0pZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 010561F000E9; Sun, 14 Jun 2026 09:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781428844; bh=jfnRHd5Yrh42NqlaThzTMtQX1FZRWVJGBOIMDcQKQys=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Jd0ax0pZos8vM/cT6h3tqmuvBhokhbPiuG78ZaY1Fboi1lHAXCT7PvAWfR5sETJkW a6Le/DUi9vJ4WrNo/RxmMgfx/UiT7IWrO2T9ut+CY/Vsf08qdmihqnZlLk19t04r2L c86xCwlDnrrRKRr2CmFcgSCHmrWIOu5zagFAlLx68u0uX5zdt7fruHcDTCJTRe3EsB WCLiL/cnEpKju4MoCnibYzTLQyeE0gf9brggWwfjVDxfH69HdWWJ/M/nq8Ru8ow0pd 2LFTQGCe0QYfL7Sy7b/gszdvkQAvz0WN3s8Uoq7yOVPfeFUfJqppJH9FFq+Tx1s6Nt w634YnFNIj1Cw== Date: Sun, 14 Jun 2026 12:20:39 +0300 From: Mike Rapoport To: Zhen Ni Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memblock: Remove redundant pageblock_align() in free_unused_memmap() Message-ID: References: <20260612031105.3350181-1-zhen.ni@easystack.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260612031105.3350181-1-zhen.ni@easystack.cn> On Fri, Jun 12, 2026 at 11:11:05AM +0800, Zhen Ni wrote: > The assignment `prev_end = pageblock_align(end)` is redundant because > `prev_end` was already aligned to pageblock oundaries inside the loop. > Since pageblock_align() is a pure function, calling it again with the > same input produces the same result. > > This line was added in commit f921f53e089a ("memblock: align freed > memory map on pageblock boundaries with SPARSEMEM"). Remove it to > simplify the code. > > Signed-off-by: Zhen Ni I queued it up for after -rc1. > --- > mm/memblock.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) -- Sincerely yours, Mike.