On Tue, 17 Apr 2012 22:39:15 -0300
Paulo Zanoni <[email protected]> wrote:

> 2012/4/16 Ben Widawsky <[email protected]>:
> > Sparse doesn't like:
> > "error: bad constant expression"
> >
> 
> <bikeshedding>
> I know you'll hate me for asking, but: how difficult is it to fix sparse?
> Adding those mallocs/frees increases the code complexity, making it
> harder to read...
> </bikeshedding>
> 

I don't consider this a bikeshed. I've always been "under the
impression" C99 was sort of taboo in the kernel. In this case
specifically, it's never a great idea to allocate an unknown amount of
stack space as it probably messes with some of the static tools and
such.

In other words, I believe the right thing to do here is not to fix
sparse. Plus there is precedent in other drivers to fix this kind of
thing for sparse. I originally had this patch create an arbitrarily
large object on the stack and fail if the args_len was too big. I can
go back to that certainly if people prefer.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to