[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180112133116.GA14498@lkp-ib03>
Date: Fri, 12 Jan 2018 21:31:16 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Tvrtko Ursulin <tvrtko.ursulin@...el.com>
Cc: kbuild-all@...org, Chris Wilson <chris@...is-wilson.co.uk>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drm/i915/pmu: fix noderef.cocci warnings
From: Fengguang Wu <fengguang.wu@...el.com>
drivers/gpu/drm/i915/i915_pmu.c:795:34-40: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
Fixes: 109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
i915_pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -792,7 +792,7 @@ create_event_attributes(struct drm_i915_
goto err_alloc;
/* Max one pointer of each attribute type plus a termination entry. */
- attr = kzalloc((count * 2 + 1) * sizeof(attr), GFP_KERNEL);
+ attr = kzalloc((count * 2 + 1) * sizeof(*attr), GFP_KERNEL);
if (!attr)
goto err_alloc;
Powered by blists - more mailing lists