Quoting Tvrtko Ursulin (2019-03-14 14:44:19) > + len = sizeof(struct drm_i915_query_engine_info) + > + RUNTIME_INFO(i915)->num_engines * > + sizeof(struct drm_i915_engine_info); Fairly recent macro helps here, len = struct_size(query_ptr, engines, RUNTIME_INFO(i915)->num_engines); -Chris