Displaying 3 results from an estimated 3 matches for "num_types".
2017 Oct 01
0
[PATCH 06/18] drm: use ARRAY_SIZE
...ernel.h>
#include "i915_drv.h"
#include "gvt.h"
#include "i915_pvinfo.h"
@@ -116,7 +117,7 @@ int intel_gvt_init_vgpu_types(struct intel_gvt *gvt)
*/
low_avail = gvt_aperture_sz(gvt) - HOST_LOW_GM_SIZE;
high_avail = gvt_hidden_sz(gvt) - HOST_HIGH_GM_SIZE;
- num_types = sizeof(vgpu_types) / sizeof(vgpu_types[0]);
+ num_types = ARRAY_SIZE(vgpu_types);
gvt->types = kzalloc(num_types * sizeof(struct intel_vgpu_type),
GFP_KERNEL);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c
index b58e...
2017 Oct 01
6
[PATCH 00/18] use ARRAY_SIZE macro
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
staging). If one of the patch should be split into several patches, let
me know.
In order to reduce
2015 Mar 09
0
[ANNOUNCE] libX11 1.6.3
...pose table
specs/libX11: Fix x & y in parameter lists to be two separate parameters
specs/libX11: Fix height & width in parameter lists to be two separate entries
specs/libX11: Add missing spaces to 'unsignedint' & 'unsignedlong' types
Fix map->num_types check in XkbAddKeyType()
Fix validation of ctrls parameter to XkbGetPerClientControls()
Use C99 named initializers to fill in events passed to XSendEvent
specs/libX11: Correct value of IconicState to match Xutil.h
specs/libX11: disengender a user reference
specs/XKB: C...