On 2020.05.18 22:00:52 +0100, Chris Wilson wrote:
> Quoting Aishwarya Ramakrishnan (2020-05-18 16:03:36)
> > Prefer ARRAY_SIZE instead of using sizeof
> >
> > Fixes coccicheck warning: Use ARRAY_SIZE
> >
> > Signed-off-by: Aishwarya Ramakrishnan
> Reviewed-by: Chris Wilson
Applied, thanks!
--
Prefer ARRAY_SIZE instead of using sizeof
Fixes coccicheck warning: Use ARRAY_SIZE
Signed-off-by: Aishwarya Ramakrishnan
---
drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
inde
Quoting Aishwarya Ramakrishnan (2020-05-18 16:03:36)
> Prefer ARRAY_SIZE instead of using sizeof
>
> Fixes coccicheck warning: Use ARRAY_SIZE
>
> Signed-off-by: Aishwarya Ramakrishnan
Reviewed-by: Chris Wilson
-Chris
___
dri-devel mailing list
dri-dev
Fix the following coccicheck warning:
drivers/gpu/drm/i915/gvt/vgpu.c:127:30-31: WARNING: Use ARRAY_SIZE
Signed-off-by: Jason Yan
---
drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vg
On Mon, 2020-04-13 at 22:32 +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
>
> drivers/gpu/drm/i915/gvt/vgpu.c:127:30-31: WARNING: Use ARRAY_SIZE
>
> Signed-off-by: Jason Yan
> ---
> drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> di
On Mon, 2018-06-18 at 13:18 +0530, rajan.v...@gmail.com wrote:
> Use ARRAY_SIZE instead of dividing sizeof array with sizeof
> an element. This fixes below warning reported by Coccinelle:
> drivers/gpu/drm//i915/gvt/vgpu.c:122:30-31: WARNING: Use ARRAY_SIZE
[]
> diff --git a/drivers/gpu/drm/i915/gv
From: Rajan Vaja
Use ARRAY_SIZE instead of dividing sizeof array with sizeof
an element. This fixes below warning reported by Coccinelle:
drivers/gpu/drm//i915/gvt/vgpu.c:122:30-31: WARNING: Use ARRAY_SIZE
Signed-off-by: Rajan Vaja
---
drivers/gpu/drm/i915/gvt/vgpu.c | 2 +-
1 file changed, 1
Thanks, applied!
On 10/16/17 10:32, Jérémy Lefaure wrote:
Using the ARRAY_SIZE macro improves the readability of the code. Also,
it's useless to use a variable to store this constant calculated at
compile time.
Found with Coccinelle with the following semantic patch:
@r depends on (org || repor
Using the ARRAY_SIZE macro improves the readability of the code. Also,
it's useless to use a variable to store this constant calculated at
compile time.
Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
(sizeof(E)@p /sizeof(*E)