From nobody Thu Mar 19 02:05:45 2026 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 CD3472690C0 for ; Mon, 16 Feb 2026 12:17:57 +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=1771244277; cv=none; b=e2Xx23UY+m80ig7wlB1TV/BnahLjcTVVOEcjDKvjqJY3YONWBpjcH01qDS3EKWGa54zD7Cyr1fZ67G9HHZXyfHi2JScEPfTCvSmBZ2h/XH6g5pNP6l1rVGkfOOV6isxAn2iebcZmk7zoIzV+uRuLwY+7vSAX+9k8LnD89reKeww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771244277; c=relaxed/simple; bh=+E6U2vTcOf3pypRLjDQO5XE3le0jSDZ9Tr+xW7xT/qs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=XlnKiaJubL2cmTYgZUidc9XPU8ke4pOvpCePH6JGJ+eLx9Dod1FZ/SqMdR+meNCN9Ugm1uzPw3Co8FwcSNBFb+B2PzTEt8/MQqZMT+zAdgniJueM2W4tUkc2pjEF4I/RDk1VoVM9V5jXJLRmH6pOQbGK5lXLHGo1KZjwTPVX/6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OSemA52u; 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="OSemA52u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03B5FC116C6; Mon, 16 Feb 2026 12:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771244277; bh=+E6U2vTcOf3pypRLjDQO5XE3le0jSDZ9Tr+xW7xT/qs=; h=From:To:Cc:Subject:Date:From; b=OSemA52uqh7Iq40ggCxCqiZhqXfsFVOrcIFgd3Rw9ZQKl4k/4P8jivjHrf8kiQx0P +L9P90YFZd5MtgNUuSeK0TziUg3SYsaI9woWafyC8Ka/5vyLV8QGCRWKQYnwEVxLw3 2lImbBHvCcBHQKOXQBBck9rjS1q+3lb4UTrC/52T41Chhm2WX985CP46tIgyd7j+g/ m7+QYfnwx3+8xCg5TNk4sjaZlGiuN8iUkxo3510NPN7sZmLsg8HUn2LagwHn3lA8mL XGRZxDbZSAu71SIUZNRRdhAQ/HjTSGuS/VkIaLgArsxOnymk6pBPfF6/arGonSOweA yqyQ6rnNdvR1g== From: Arnd Bergmann To: Andrew Morton , David Hildenbrand , Vlastimil Babka Cc: Arnd Bergmann , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Alexei Starovoitov , Shakeel Butt , Kefeng Wang , Joshua Hahn , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: change vma_alloc_folio_noprof() macro to inline function Date: Mon, 16 Feb 2026 13:17:44 +0100 Message-Id: <20260216121751.2378374-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann In a few rare configurations with extra warnings eanbled, the new drm_pagemap_migrate_populate_ram_pfn() calls vma_alloc_folio_noprof() but that does not use all the arguments, leading to a harmless warning: drivers/gpu/drm/drm_pagemap.c: In function 'drm_pagemap_migrate_populate_ra= m_pfn': drivers/gpu/drm/drm_pagemap.c:701:63: error: parameter 'addr' set but not u= sed [-Werror=3Dunused-but-set-parameter=3D] 701 | unsigned long addr) | ~~~~~~~~~~~~~~^~~~ Replace the macro with an inline function so the compiler can see how the argument would be used, but is still able to optimize out the assignments. Signed-off-by: Arnd Bergmann Acked-by: Zi Yan Reviewed-by: Lorenzo Stoakes Reviewed-by: Suren Baghdasaryan --- include/linux/gfp.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 6ecf6dda93e0..23240208a91f 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -335,8 +335,11 @@ static inline struct folio *folio_alloc_mpol_noprof(gf= p_t gfp, unsigned int orde { return folio_alloc_noprof(gfp, order); } -#define vma_alloc_folio_noprof(gfp, order, vma, addr) \ - folio_alloc_noprof(gfp, order) +static inline struct folio *vma_alloc_folio_noprof(gfp_t gfp, int order, + struct vm_area_struct *vma, unsigned long addr) +{ + return folio_alloc_noprof(gfp, order); +} #endif =20 #define alloc_pages(...) alloc_hooks(alloc_pages_noprof(__VA_ARGS__)) --=20 2.39.5