Skip to contentSkip to conversation

arm64: hibernate: Fix warning for cast from restricted gfp_t

PATCH Applied Min-Hua Chen 2 participants 2 messages Sep 10, 2024 – Sep 12, 2024 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: hibernate: Fix warning for cast from restricted gfp_t

This patch fixes the following warning by adding __force
to the cast:
arch/arm64/kernel/hibernate.c:410:44: sparse: warning: cast from restricted gfp_t

No functional change intended.

---
 arch/arm64/kernel/hibernate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/hibernate.c +1 -1
index 02870beb271e..7b11d84f533c 100644
@@ -407,7 +407,7 @@ int swsusp_arch_resume(void)
 					  void *, phys_addr_t, phys_addr_t);
 	struct trans_pgd_info trans_info = {
 		.trans_alloc_page	= hibernate_page_alloc,
-		.trans_alloc_arg	= (void *)GFP_ATOMIC,
+		.trans_alloc_arg	= (__force void *)GFP_ATOMIC,
 	};
 
 	/*
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Min-Hua Chen

This patch fixes the following warning by adding __force
to the cast:
arch/arm64/kernel/hibernate.c:410:44: sparse: warning: cast from restricted gfp_t

No functional change intended.

[...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: hibernate: Fix warning for cast from restricted gfp_t

      https://git.kernel.org/arm64/c/ecdd16df4564

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev