[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4f58955fcf54c4af12f7ef3d63e323ed50e24fba.1275360951.git.joe@perches.com>
Date: Mon, 31 May 2010 20:23:07 -0700
From: Joe Perches <joe@...ches.com>
To: linux-kernel@...r.kernel.org
Cc: David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org
Subject: [PATCH 05/21] drivers/gpu/drm: Remove unnecessary kmalloc casts
Signed-off-by: Joe Perches <joe@...ches.com>
---
drivers/gpu/drm/drm_sman.c | 4 +---
drivers/gpu/drm/i915/i915_dma.c | 3 +--
2 files changed, 2 insertions(+), 5 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;
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 2a6b5de..f3d5d9f 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1821,8 +1821,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv)
struct drm_i915_file_private *i915_file_priv;
DRM_DEBUG_DRIVER("\n");
- i915_file_priv = (struct drm_i915_file_private *)
- kmalloc(sizeof(*i915_file_priv), GFP_KERNEL);
+ i915_file_priv = kmalloc(sizeof(*i915_file_priv), GFP_KERNEL);
if (!i915_file_priv)
return -ENOMEM;
--
1.7.0.3.311.g6a6955
--
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