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 2D26CAD5A for ; Tue, 30 Dec 2025 13:35:21 +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=1767101722; cv=none; b=D3XUU6iF/n22iKgUSfma7gijzuN8oh74DMD9sNLej6jrxKSN3FTB3UeX/tv9s/XhqD5+ffCDS/NZy/SdBOPzsF/FY2S4nTt2a/2DIKpgXY7gFOh45cw/GsErOQcZ/a5fFMFXCBPcPTTp5bCO6SjW4Vcpg0Usyo4uOIIBZNLsbQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767101722; c=relaxed/simple; bh=zrKnPVnZk0r9u4XqkpFB0C/GWctQn1znJPUkHa9muHI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LI7T80erL+uEMCG6HGxvZSBxsSBrUml7Evlg8RCkkaMgvy6IA2wMz3AycMQKvmxJMyNTa/GhE+lFiAPZ21PBqQ9lg17xDvvCYvcDo7U5lwdJY90Jd4bLU0lm5JSYu8zkYbRB+cz9dow4xGOXuVo+9x5PknDPREbjR/Wupygfq14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CWDE7nCs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CWDE7nCs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F720C4CEFB; Tue, 30 Dec 2025 13:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767101721; bh=zrKnPVnZk0r9u4XqkpFB0C/GWctQn1znJPUkHa9muHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CWDE7nCsUJhCXw5B4aa3hp8BANcsD96RzhzYkVW38qqvxJyoTH1tjUnCbNk4O26n5 2iz7gkf8n3ASHvG48GU6IxExF/IqtSzYqY8mfqx8G/Ro0obv3fSe4giIykpev8dNYI SKDyBe3qDH10fXDaAoJrCYtW3fk3loUqEwMBMqSdUL3L2cXK4k+RAe3l+zGnZEkz4b I0BPeauaqkirrHpgVqvWI0tF58znzcSrgOkn3ANMWW0UxG1V7aLs2dYAEF2OwOksvH van6AtS9rOIYp9v5b8yCXwVvnLMsw0WsSj+miHsaEU0EBVwLg/ZAga4xjEdUjhehxo OQJd6zW0N4eXQ== From: Mike Rapoport To: akpm , david , shengminghu512 Cc: Mike Rapoport , "lorenzo.stoakes" , "Liam.Howlett" , vbabka , surenb , mhocko , linux-mm , linux-kernel , "hu.shengming" , "zhang.run" Subject: Re: [PATCH v2] mm/memblock: drop redundant 'struct page *' argument from memblock_free_pages() Date: Tue, 30 Dec 2025 15:35:12 +0200 Message-ID: <176710164796.4000036.11847815060413161135.b4-ty@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: References: 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="utf-8" Content-Transfer-Encoding: 8bit On Mon, 29 Dec 2025 21:52:27 +0800, shengminghu512 wrote: > memblock_free_pages() currently takes both a struct page * and the > corresponding PFN. The page pointer is always derived from the PFN at > call sites (pfn_to_page(pfn)), making the parameter redundant and also > allowing accidental mismatches between the two arguments. > > Simplify the interface by removing the struct page * argument and > deriving the page locally from the PFN, after the deferred struct page > initialization check. This keeps the behavior unchanged while making > the helper harder to misuse. > > [...] Applied to for-next branch of memblock.git tree, thanks! [1/1] mm/memblock: drop redundant 'struct page *' argument from memblock_free_pages() commit: 42496efbfba1741fd4f1278366249bce9d34884a tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock branch: for-next -- Sincerely yours, Mike.