[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1101191522570.26685@pobox.suse.cz>
Date: Wed, 19 Jan 2011 15:23:15 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: Jesper Juhl <jj@...osbits.net>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
David Airlie <airlied@...ux.ie>
Subject: Re: [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void
ptr returning alloc function return values
On Tue, 9 Nov 2010, Jesper Juhl wrote:
> Hi,
>
> The [vk][cmz]alloc(_node) family of functions return void pointers which
> it's completely unnecessary/pointless to cast to other pointer types since
> that happens implicitly.
>
> This patch removes such casts from drivers/gpu/drm/
>
>
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
> ---
> drm_sman.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_sman.c b/drivers/gpu/drm/drm_sman.c
> index 463aed9..3466458 100644
> --- a/drivers/gpu/drm/drm_sman.c
> +++ b/drivers/gpu/drm/drm_sman.c
> @@ -59,9 +59,7 @@ drm_sman_init(struct drm_sman * sman, unsigned int num_managers,
> {
> int ret = 0;
>
> - sman->mm = (struct drm_sman_mm *) kcalloc(num_managers,
> - sizeof(*sman->mm),
> - GFP_KERNEL);
> + sman->mm = kcalloc(num_managers, sizeof(*sman->mm), GFP_KERNEL);
> if (!sman->mm) {
> ret = -ENOMEM;
> goto out;
>
Doesn't seem to be present in linux-next as of today, applied to trivial
queue.
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