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

Andi Kleen
2009-04-08T10:43:57Z

Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> writes:
>>
>> @@ -632,14 +633,14 @@
>> static void mce_init_timer(void)
>> {
>> struct timer_list *t = &__get_cpu_var(mce_timer);
>> + int *n = &__get_cpu_var(next_interval);
>>
>> - /* data race harmless because everyone sets to the same value */
>> - if (!next_interval)
>> - next_interval = check_interval * HZ;
>> - if (!next_interval)
>
> [plan A]
> Add
> if (!check_interval)
> return;
>
> Or...
>
>> + 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?

-Andi

--
ak@linux.intel.com -- Speaking for myself only.