Fix Me in hpet.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 23 lines · nick
Greeting Thomas and other kernel coders,
I am wondering about the fix in the code below and whether this is still valid as reading it seems to may no sense as we are using completion variables and therefore the delayed version ofschedule_work_onseems much better in this case. Further more I am pasting the code below from vim in order to make it easier for you.
Cheers Nick
static int hpet_cpuhp_notify(structnotifier_block*n,
unsigned long action, void *hcpu){ unsigned long cpu = (unsigned long)hcpu; struct hpet_work_struct work; struct hpet_dev *hdev = per_cpu(cpu_hpet_dev, cpu); switch (action & 0xf) { case CPU_ONLINE: INIT_DELAYED_WORK_ONSTACK(&work.work, hpet_work); init_completion(&work.complete); /* FIXME: add schedule_work_on() */ schedule_delayed_work_on(cpu, &work.work, 0); wait_for_completion(&work.complete); destroy_delayed_work_on_stack(&work.work); break; case CPU_DEAD: if (hdev) {
Quoted 9 lines
free_irq(hdev->irq, hdev);
hdev->flags &= ~HPET_DEV_USED;
per_cpu(cpu_hpet_dev, cpu) = NULL;
}
break;
}
return NOTIFY_OK;
}Looks obsolete to me. It might be interesting to look at the "git blame" output for this code.
-hpa