Re: [Intel-gfx] [PATCH][next] drm/i915/pmu: fix sizeof on attr, should be *attr

2018-01-12 Thread Colin Ian King
On 12/01/18 17:48, Tvrtko Ursulin wrote: > > Hi, > > On 12/01/2018 17:36, Colin King wrote: >> From: Colin Ian King >> >> I believe the sizeof(attr) should be in fact sizeof(*attr), fortunately >> the current code works because sizeof(struct attribute **) is the same >> as sizeof(struct attribut

Re: [Intel-gfx] [PATCH][next] drm/i915/pmu: fix sizeof on attr, should be *attr

2018-01-12 Thread Tvrtko Ursulin
Hi, On 12/01/2018 17:36, Colin King wrote: From: Colin Ian King I believe the sizeof(attr) should be in fact sizeof(*attr), fortunately the current code works because sizeof(struct attribute **) is the same as sizeof(struct attribute *) for x86. Thanks, kbuild also reported it and I just pu

[Intel-gfx] [PATCH][next] drm/i915/pmu: fix sizeof on attr, should be *attr

2018-01-12 Thread Colin King
From: Colin Ian King I believe the sizeof(attr) should be in fact sizeof(*attr), fortunately the current code works because sizeof(struct attribute **) is the same as sizeof(struct attribute *) for x86. Detected by CoverityScan, CID#1463854 ("Sizeof not portable") Fixes: 109ec558370f ("drm/i915