projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4900727
)
drm/i915/pmu: fix noderef.cocci warnings
author
Fengguang Wu
<
[email protected]
>
Fri, 12 Jan 2018 17:03:39 +0000
(17:03 +0000)
committer
Tvrtko Ursulin
<
[email protected]
>
Fri, 12 Jan 2018 17:40:29 +0000
(17:40 +0000)
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 <
[email protected]
>
Reviewed-by: Tvrtko Ursulin <
[email protected]
>
Signed-off-by: Tvrtko Ursulin <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/i915_pmu.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_pmu.c
b/drivers/gpu/drm/i915/i915_pmu.c
index 95ab5e28f5be3d737774e3f314adcbbe1954ab35..9be4f5201e41e03b5c2fb017592f2457809f3cc1 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_pmu.c
+++ b/
drivers/gpu/drm/i915/i915_pmu.c
@@
-794,7
+794,7
@@
create_event_attributes(struct drm_i915_private *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;