[PATCH] drm/modeset: Remove redundant __GFP_NOWARN from GFP_NOWAIT allocations

Li Qiang posted 1 patch 3 months, 1 week ago
drivers/gpu/drm/drm_modeset_lock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] drm/modeset: Remove redundant __GFP_NOWARN from GFP_NOWAIT allocations
Posted by Li Qiang 3 months, 1 week ago
Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
GFP_NOWAIT implicitly include __GFP_NOWARN. Therefore, explicit
__GFP_NOWARN combined with GFP_NOWAIT is redundant and can be removed.

Clean up such redundant flag usage in DRM modeset lock debug code.

Signed-off-by: Li Qiang <liqiang01@kylinos.cn>
---
 drivers/gpu/drm/drm_modeset_lock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
index beb91a13a312..58eac20a8138 100644
--- a/drivers/gpu/drm/drm_modeset_lock.c
+++ b/drivers/gpu/drm/drm_modeset_lock.c
@@ -88,7 +88,7 @@ static noinline depot_stack_handle_t __drm_stack_depot_save(void)
 
 	n = stack_trace_save(entries, ARRAY_SIZE(entries), 1);
 
-	return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN);
+	return stack_depot_save(entries, n, GFP_NOWAIT);
 }
 
 static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
@@ -98,7 +98,7 @@ static void __drm_stack_depot_print(depot_stack_handle_t stack_depot)
 	unsigned int nr_entries;
 	char *buf;
 
-	buf = kmalloc(PAGE_SIZE, GFP_NOWAIT | __GFP_NOWARN);
+	buf = kmalloc(PAGE_SIZE, GFP_NOWAIT);
 	if (!buf)
 		return;
 
-- 
2.25.1