* [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values
@ 2010-11-08 23:08 Jesper Juhl
2011-01-19 14:23 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2010-11-08 23:08 UTC (permalink / raw)
To: linux-kernel; +Cc: trivial, dri-devel, David Airlie
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@chaosbits.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;
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values
2010-11-08 23:08 [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values Jesper Juhl
@ 2011-01-19 14:23 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2011-01-19 14:23 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel, dri-devel, David Airlie
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@chaosbits.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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values
@ 2011-01-19 14:23 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2011-01-19 14:23 UTC (permalink / raw)
To: Jesper Juhl; +Cc: linux-kernel, dri-devel
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@chaosbits.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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-19 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-08 23:08 [PATCH 03/17][trivial] GPU DRM: Remove unnecessary casts of void ptr returning alloc function return values Jesper Juhl
2011-01-19 14:23 ` Jiri Kosina
2011-01-19 14:23 ` Jiri Kosina
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.