Re: [PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-15 Thread Salvatore Mesoraca
2018-03-14 13:17 GMT+01:00 Jani Nikula : > Thanks for your patch. However, Chris beat you to it with: > > 7aa0b14ede64 ("drm/i915: Remove variable length arrays from sseu debugfs > printers") I didn't notice it :) > as well as adding -Wvla to our subdir-ccflags-y to prevent more from > cropping u

Re: [PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-15 Thread Salvatore Mesoraca
2018-03-14 13:27 GMT+01:00 Joonas Lahtinen : > CHV_SS_MAX should be good enough. Make these function scoped (so #define > at the beginning and #undef at the end of function). > > Do use ARRAY_SIZE() instead of repeating. Thank you very much for your suggestions. Unfortunately, it seems that someon

Re: [PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-14 Thread Joonas Lahtinen
Quoting Salvatore Mesoraca (2018-03-13 21:51:28) > Avoid 3 VLAs[1] by using real constant expressions instead of variables. > The compiler should be able to optimize the original code and avoid using > any actual VLAs. Anyway this change is useful because it will avoid a false > positives with -Wvl

Re: [PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-14 Thread Jani Nikula
On Tue, 13 Mar 2018, Salvatore Mesoraca wrote: > Avoid 3 VLAs[1] by using real constant expressions instead of variables. > The compiler should be able to optimize the original code and avoid using > any actual VLAs. Anyway this change is useful because it will avoid a false > positives with -Wvla

[PATCH] drm/i915: drop various VLAs in i915_debugfs.c

2018-03-14 Thread Salvatore Mesoraca
Avoid 3 VLAs[1] by using real constant expressions instead of variables. The compiler should be able to optimize the original code and avoid using any actual VLAs. Anyway this change is useful because it will avoid a false positives with -Wvla, it might also help the compiler generating better code