Re: sparse segfaults

Linus Torvalds
2004-11-20T17:00:18Z

On Sat, 20 Nov 2004, Russell King wrote:
>
> Looks like expr->cond_true is NULL. Line 566 of kernel/timer.c is:
>
> int tickadj = 500/HZ ? : 1; /* microsecs */
>
> which makes it look like sparse doesn't understand such constructions.

Sparse does, but there were some changes in how it handles them, and they
were obviously buggy for the trivial compile-time-evaluation case. I
didn't see them because on all _my_ archiectures, 500/HZ evaluates to
false, so it doesn't look at the true case (which is a special case).

Trivial fix checked in and pushed out. Thanks,

Linus