Re: [PATCH] [1/4] x86: MCE: Make polling timer interval per CPU

From: Andi Kleen
Date: Wed Apr 08 2009 - 07:59:29 EST


On Wed, Apr 08, 2009 at 08:30:45PM +0900, Hidetoshi Seto wrote:
> Andi Kleen wrote:
> >>> + if (!*n)
> >>> + *n = check_interval * HZ;
> >>> + if (!*n)
> >>> return;
> >
> > The !*n will return for check_interval == 0 because 0*HZ is still 0 so it should be
> > equivalent. Did I miss something?
>
> At First, *n is 0 on boot.
> And then soon it will be initialized to non-zero (check_interval * HZ)
> by the first if-statement.
>
> After that if check_interval is changed via sysfs while *n is non-zero,
> which if-statement runs?

Ok got your point now. The first if (!*n) needs to be dropped indeed.
Will respin that patch.

Thanks.

-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/