Hello, Aaron. On Thu, Jan 10, 2013 at 05:24:25PM +0800, Aaron Lu wrote: > +/* > + * Update the zpodd->zp_ready field. This field will only be set > + * if the ODD has stayed in ZP ready state for zpodd_poweroff_delay > + * time, and will be used to decide if power off is allowed. If it > + * is set, it will be cleared during resume from powered off state. > + */ > +void zpodd_on_suspend(struct ata_device *dev) > +{ > + struct zpodd *zpodd = dev->zpodd; > + unsigned long expires; > + > + if (!zpready(dev)) { > + zpodd->zp_sampled = false; > + return; > + } > + > + if (!zpodd->zp_sampled) { > + zpodd->zp_sampled = true; > + zpodd->last_ready = jiffies; > + return; Is the above return necessary? Can't we just fall through and always check the actual condition? > + } > + > + expires = zpodd->last_ready + > + msecs_to_jiffies(zpodd_poweroff_delay * 1000); > + if (time_before(jiffies, expires)) > + return; > + > + zpodd->zp_ready = true; > +} Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html