Steven Rostedt <[email protected]> wrote:
>
> This patch creates a directory in /sys/kernel called idle.
>
At no point do you appear to explain _why_ the kernel needs this feature?
> ...
> - pm_idle = pm_idle_save;
> + int tries = 0;
> + int ret;
> + set_idle(NULL);
> + do {
> + if ((ret = unregister_idle(PM_IDLE_NAME)) == 0)
> + break;
> + /*
> + * for some reason the idle function is being used.
> + * Wait a little and then try again.
> + */
> + if (ret == -EINVAL) {
> + printk(KERN_WARNING
> + "ACPI idle function never registered?\n");
> + break;
> + }
> + yield();
> + } while (tries++ < 10);
The use of yield() could be problematic - its semantics are rather
ill-defined. Maybe msleep(1) or something?
What's this loop here for anyway? Looks kludgy.
> + if (tries > 10) {
> + printk(KERN_WARNING
> + "Unable to unresgister ACPI idle function\n");
tpyo
> + memset(&idle_kobj, 0, sizeof(idle_kobj));
There are several memsets of statically allocated structures which are
already all-zero.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]