[Intel-gfx] [RFC PATCH v1 03/50] fault-inject: Shrink struct fault_attr

2020-03-30 Thread George Spelvin
9 for some reason, which had the same effect as 100. Leaving it alone would have worked with a compiler warning (999 % 256 = 231 is also >= 100, so would have the same effect), but it seemed better to clean it up. Signed-off-by: George Spelvin Cc: Akinobu Mita Cc: Jani Nikula Cc: Joonas Laht

[Intel-gfx] [RFC PATCH v1 12/50] Treewide: Extirpate prandom_u32_state(rnd) % range

2020-03-30 Thread George Spelvin
There's no prandom_u32_state_max, so we're using reciprocal_scale() here directly. (Also add a missing "const" to drivers/gpu/drm/i915/selftests/scatterist.c) Signed-off-by: George Spelvin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedeskt

Re: [Intel-gfx] [PATCH] drivers/gpu/drm/i915/selftests/i915_buddy.c: Fix bug

2020-03-27 Thread George Spelvin
On Thu, Mar 26, 2020 at 05:04:43PM +, Matthew Auld wrote: > Reviewed-by: Matthew Auld Thank you! I got some incomprehensible error emails (reproduced at https://patchwork.freedesktop.org/series/75090/) from the patchwork daemon, complaining about additional test failures. Obviously, I car

[Intel-gfx] [PATCH] drivers/gpu/drm/i915/selftests/i915_buddy.c: Fix bug

2020-03-25 Thread George Spelvin
2 bits of s and ms are always zero, it's a lot simpler just to divide them by 4096, then everything fits into 32 bits, and we can easily generate a random number 1 <= s <= 0x1f. Signed-off-by: George Spelvin Fixes: 14d1b9a6247c Cc: Matthew Auld Cc: Jani Nikula Cc: Joonas Lahtinen