lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1104081912350.6392@deuxcents.site>
Date:	Sun, 10 Apr 2011 08:02:38 -0700 (PDT)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [TRIVIAL] drm: minor kref_put() nits

On Sun, 27 Feb 2011, Paul Bolle wrote:

> There's no need to pass kref_put() the address of a function (just the
> function will do just fine) nor to cast its unused return to void.
> 
> Signed-off-by: Paul Bolle <pebolle@...cali.nl>
> ---
>  drivers/gpu/drm/radeon/radeon_fence.c |    2 +-
>  drivers/gpu/drm/ttm/ttm_object.c      |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
> index 171b0b2..a1d3ae6 100644
> --- a/drivers/gpu/drm/radeon/radeon_fence.c
> +++ b/drivers/gpu/drm/radeon/radeon_fence.c
> @@ -324,7 +324,7 @@ void radeon_fence_unref(struct radeon_fence **fence)
>  
>  	*fence = NULL;
>  	if (tmp) {
> -		kref_put(&tmp->kref, &radeon_fence_destroy);
> +		kref_put(&tmp->kref, radeon_fence_destroy);
>  	}
>  }
>  
> diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c
> index 75e9d6f..ebddd44 100644
> --- a/drivers/gpu/drm/ttm/ttm_object.c
> +++ b/drivers/gpu/drm/ttm/ttm_object.c
> @@ -206,7 +206,7 @@ void ttm_base_object_unref(struct ttm_base_object **p_base)
>  	 */
>  
>  	write_lock(&tdev->object_lock);
> -	(void)kref_put(&base->refcount, &ttm_release_base);
> +	kref_put(&base->refcount, ttm_release_base);
>  	write_unlock(&tdev->object_lock);
>  }
>  EXPORT_SYMBOL(ttm_base_object_unref);

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ