Skip to contentSkip to conversation

drm/vc4: bo: Fix unused variable warning

PATCH Applied Maxime Ripard 2 participants 3 messages Jan 13, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: bo: Fix unused variable warning

Commit 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog") removed the only user of the ret variable, but didn't remove the variable itself leading to a unused variable warning.

Remove that variable.

Fixes 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog")
---
 drivers/gpu/drm/vc4/vc4_bo.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/vc4/vc4_bo.c +0 -1
index 29ce2fa72cc4..c5947ed8cc81 100644
@@ -395,7 +395,6 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
 {
 	struct vc4_dev *vc4 = to_vc4_dev(dev);
 	struct vc4_bo *bo;
-	int ret;
 
 	if (WARN_ON_ONCE(vc4->is_vc5))
 		return ERR_PTR(-ENODEV);
Signature · 1 line
2.39.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Maxime Ripard

Commit 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog") removed the only user of the ret variable, but didn't remove the

s/user/use

Quoted 7 lines

variable itself leading to a unused variable warning.

Remove that variable.

Fixes 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog")

With that small nit:

Best Regards,
- Maíra Canal

Quoted 16 lines
---
  drivers/gpu/drm/vc4/vc4_bo.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/vc4/vc4_bo.c +0 -1
index 29ce2fa72cc4..c5947ed8cc81 100644
@@ -395,7 +395,6 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
  {
  	struct vc4_dev *vc4 = to_vc4_dev(dev);
  	struct vc4_bo *bo;
-	int ret;
 
  	if (WARN_ON_ONCE(vc4->is_vc5))
  		return ERR_PTR(-ENODEV);
author Applied
#2 lore raw

Re: (subset) [PATCH] drm/vc4: bo: Fix unused variable warning

In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard

Commit 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog") removed the only user of the ret variable, but didn't remove the variable itself leading to a unused variable warning.

Remove that variable.

[...]

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime