Message ID | ddf86b59-696a-45f0-96dd-b87aa7b9ab2e@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/managed: Clean up GFP_ flag usage in drmm_kmalloc() | expand |
On Fri, 21 Jul 2023 17:57:49 +0300, Dan Carpenter wrote: > This code is not using the correct gfp flags which were passed in. > However, this does not affect runtime because kstrdup_const() is a > no-op in this context. (It just returns the "kmalloc" string literal > without doing an allocation.) > > Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime
diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c index 5423ad883729..bcd111404b12 100644 --- a/drivers/gpu/drm/drm_managed.c +++ b/drivers/gpu/drm/drm_managed.c @@ -196,7 +196,7 @@ void *drmm_kmalloc(struct drm_device *dev, size_t size, gfp_t gfp) size, gfp); return NULL; } - dr->node.name = kstrdup_const("kmalloc", GFP_KERNEL); + dr->node.name = kstrdup_const("kmalloc", gfp); add_dr(dev, dr);
This code is not using the correct gfp flags which were passed in. However, this does not affect runtime because kstrdup_const() is a no-op in this context. (It just returns the "kmalloc" string literal without doing an allocation.) Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- drivers/gpu/drm/drm_managed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)