diff mbox series

drm/vc4: bo: Fix unused variable warning

Message ID 20230113154637.1704116-1-maxime@cerno.tech (mailing list archive)
State New, archived
Headers show
Series drm/vc4: bo: Fix unused variable warning | expand

Commit Message

Maxime Ripard Jan. 13, 2023, 3:46 p.m. UTC
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.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_bo.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Maíra Canal Jan. 13, 2023, 4:10 p.m. UTC | #1
On 1/13/23 12:46, Maxime Ripard wrote:
> 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

> variable itself leading to a unused variable warning.
> 
> Remove that variable.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 07a2975c65f2 ("drm/vc4: bo: Fix drmm_mutex_init memory hog")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

With that small nit:

Reviewed-by: Maíra Canal <mcanal@igalia.com>

Best Regards,
- Maíra Canal

> ---
>   drivers/gpu/drm/vc4/vc4_bo.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
> index 29ce2fa72cc4..c5947ed8cc81 100644
> --- a/drivers/gpu/drm/vc4/vc4_bo.c
> +++ b/drivers/gpu/drm/vc4/vc4_bo.c
> @@ -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);
Maxime Ripard Jan. 13, 2023, 4:59 p.m. UTC | #2
On Fri, 13 Jan 2023 16:46:37 +0100, Maxime Ripard wrote:
> 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
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index 29ce2fa72cc4..c5947ed8cc81 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -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);