[PATCH] drm/via: use ARRAY_SIZE

2017-10-16 Thread Jérémy Lefaure
Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/via/via_verifier.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH] drm/nouveau/bios/init: use ARRAY_SIZE

2017-10-16 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 7

[PATCH] drm/amdgpu: use ARRAY_SIZE

2017-10-16 Thread Jérémy Lefaure
Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9

[PATCH] drm/gma500: use ARRAY_SIZE

2017-10-16 Thread Jérémy Lefaure
/sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure --- This patch was part of a bigger patch [1] reviewed by Thierry Reding before it was split in several patches. [1]: https://patchwork.kernel.org/patch/9979843/ drivers/gpu/drm/gma500/psb_intel_sdvo.c | 9 - 1

[PATCH] drm/i915/gvt: use ARRAY_SIZE

2017-10-16 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: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-03 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: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 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

[PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 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

[PATCH 06/18] drm: use ARRAY_SIZE

2017-10-02 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

[PATCH] drm: drm_pci.h: add missing include

2017-03-13 Thread Jérémy Lefaure
drm_platform_init(struct drm_driver *driver, struct platform_device *platform_device); ^ Fixes: 23ef59ef6dcc ("drm: Extract drm_pci.h") Signed-off-by: Jérémy Lefaure --- include/drm/drm_pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/drm_pci.h b/include/drm/drm_pci.h ind

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

2016-11-28 Thread Jérémy Lefaure
Two warnings are produced by gcc (tested with gcc 6.2.1): drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’: drivers/gpu/drm/i915/intel_csr.c:400:5: error: ‘fw’ is used uninitialized in this function [-Werror=uninitialized] if (fw) ^ and In file included from drive