[Intel-gfx] [PATCH] drm/i915/gvt: use ARRAY_SIZE

2017-10-15 Thread Jérémy Lefaure
of(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1]. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/i915/gvt/vgpu.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [Intel-gfx] [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming it'

Re: [Intel-gfx] [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 09:01:31 +1100 "Tobin C. Harding" wrote: > > In order to reduce the size of the To: and Cc: lines, each patch of the > > series is sent only to the maintainers and lists concerned by the patch. > > This cover letter is sent to every list concerned by this series. > > Why don

[Intel-gfx] [PATCH 06/18] drm: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 + drivers/gpu/drm

[Intel-gfx] [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Jérémy Lefaure
Hi everyone, Using ARRAY_SIZE improves the code readability. I used coccinelle (I made a change to the array_size.cocci file [1]) to find several places where ARRAY_SIZE could be used instead of other macros or sizeof division. I tried to divide the changes into a patch per subsystem (excepted for

[Intel-gfx] [PATCH] drm/i915: fix compilation warnings on maybe uninitialized pointers

2016-11-28 Thread Jérémy Lefaure
removes the warnings. Signed-off-by: Jérémy Lefaure --- drivers/gpu/drm/i915/intel_csr.c| 2 +- drivers/gpu/drm/i915/intel_guc_loader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index d7a04bc

Re: [Intel-gfx] [PATCH 0/2] drm/i915/gvt: fix compilation errors in gtt.c

2016-10-24 Thread Jérémy Lefaure
On Mon, 24 Oct 2016 10:36:58 +0800 Zhenyu Wang wrote: > On 2016.10.20 18:05:56 -0400, Jérémy Lefaure wrote: > > This series fixes 2 compilations errors in gvt/gtt.c on 32-bits platform: > > [PATCH 1/2] drm/i915/gvt: fix bad 32 bit shift in gtt > > [PATCH 2/2] drm/i915/gvt

[Intel-gfx] [PATCH 2/2] drm/i915/gvt: fix an error string format

2016-10-21 Thread Jérémy Lefaure
It is better to use %p format for void pointers instead of casting them because a void* is not necessary a 64 bits value. Signed-off-by: Jérémy Lefaure --- drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers

[Intel-gfx] [PATCH 0/2] drm/i915/gvt: fix compilation errors in gtt.c

2016-10-21 Thread Jérémy Lefaure
This series fixes 2 compilations errors in gvt/gtt.c on 32-bits platform: [PATCH 1/2] drm/i915/gvt: fix bad 32 bit shift in gtt [PATCH 2/2] drm/i915/gvt: fix an error string format The file gtt.c still does not compile because of shifting errors. Should the 32 bits architecture be supported ? __

[Intel-gfx] [PATCH 1/2] drm/i915/gvt: fix bad 32 bit shift in gtt

2016-10-21 Thread Jérémy Lefaure
Since ioread32 returns a 32-bit value, it is impossible to left-shift this value by 32 bits (it produces a compilation error). Casting the return value of ioread32 fix this issue. Signed-off-by: Jérémy Lefaure --- drivers/gpu/drm/i915/gvt/gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion