* [PATCH] drm: Fix kcalloc parameters swapped
@ 2012-02-10 12:04 Axel Lin
2012-02-10 15:15 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-02-10 12:04 UTC (permalink / raw)
To: linux-kernel
Cc: Keith Packard, Chris Wilson, Dave Airlie, Patrik Jakobsson,
dri-devel
The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/gpu/drm/gma500/intel_gmbus.c | 2 +-
drivers/gpu/drm/i915/intel_i2c.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/gma500/intel_gmbus.c b/drivers/gpu/drm/gma500/intel_gmbus.c
index 147584a..9db9052 100644
--- a/drivers/gpu/drm/gma500/intel_gmbus.c
+++ b/drivers/gpu/drm/gma500/intel_gmbus.c
@@ -395,7 +395,7 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
struct drm_psb_private *dev_priv = dev->dev_private;
int ret, i;
- dev_priv->gmbus = kcalloc(sizeof(struct intel_gmbus), GMBUS_NUM_PORTS,
+ dev_priv->gmbus = kcalloc(GMBUS_NUM_PORTS, sizeof(struct intel_gmbus),
GFP_KERNEL);
if (dev_priv->gmbus == NULL)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 7fa4f64..03573e0 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -375,7 +375,7 @@ int intel_setup_gmbus(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private;
int ret, i;
- dev_priv->gmbus = kcalloc(sizeof(struct intel_gmbus), GMBUS_NUM_PORTS,
+ dev_priv->gmbus = kcalloc(GMBUS_NUM_PORTS, sizeof(struct intel_gmbus),
GFP_KERNEL);
if (dev_priv->gmbus == NULL)
return -ENOMEM;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: Fix kcalloc parameters swapped
2012-02-10 12:04 [PATCH] drm: Fix kcalloc parameters swapped Axel Lin
@ 2012-02-10 15:15 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2012-02-10 15:15 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, dri-devel, Patrik, Dave Airlie
On Fri, 10 Feb 2012 20:04:52 +0800
Axel Lin <axel.lin@gmail.com> wrote:
> The first parameter should be "number of elements" and the second parameter
> should be "element size".
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-10 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 12:04 [PATCH] drm: Fix kcalloc parameters swapped Axel Lin
2012-02-10 15:15 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).