On 04/07/2017 10:11 AM, Chris Wilson wrote:
On Fri, Apr 07, 2017 at 06:23:14PM +0200, Michal Wajdeczko wrote:
On Fri, Apr 07, 2017 at 02:15:47AM -0700, Oscar Mateo wrote:
Not really needed, but makes the next change a little bit more compact.

v2:
   - Use zero-based numbering for engine names: xcs0, xcs1.. xcsN (Tvrtko, 
Chris)
   - Make sure the mock engine name is null-terminated (Tvrtko, Chris)

v3: Because I'm stupid (Chris)

v4: Verify engine name wasn't truncated (Michal)

Cc: Paulo Zanoni <paulo.r.zan...@intel.com>
Cc: Rodrigo Vivi <rodrigo.v...@intel.com>
Cc: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospu...@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
Cc: Michal Wajdeczko <michal.wajdec...@intel.com>
Signed-off-by: Oscar Mateo <oscar.ma...@intel.com>
---
Reviewed-by: Michal Wajdeczko <michal.wajdec...@intel.com>
s/WARN_ON/GEM_WARN_ON/ ?
As in:

    if (GEM_WARN_ON(snprintf(engine->name, sizeof(engine->name), "%s%u",
            class_info->name, info->instance) >= sizeof(engine->name)))
        ;

or do you want to return an error? (I don't really see the need, but...)
The WARN_ON in mock_engine.c is off-by-one, but really we don't care too
much there so just kill that warn.
-Chris


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to