break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_errata_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_percpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_smpboot_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
dev = processor_powers[cpu];
if (!rc && cpuidle_current_governor->enable)
rc = cpuidle_current_governor->enable(dev);
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
case CPU_ONLINE:
if (!dev)
break;
}
- return !err ? NOTIFY_DONE : notifier_from_errno(err);
+ return notifier_from_errno(err);
}
static struct notifier_block x2apic_cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_percpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_smpboot_nfb = {
{
void *hcpu = (void *)(long)cpu;
int notifier_rc = notifier_call_chain(&cpu_chain, action, hcpu, nb);
- int ret = (notifier_rc == NOTIFY_DONE) ? 0 : notifier_to_errno(notifier_rc);
+ int ret = notifier_to_errno(notifier_rc);
BUG_ON(ret && nofail);
rcu_read_unlock(&sched_res_rculock);
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_schedule_nfb = {
break;
}
- return !rc ? NOTIFY_DONE : notifier_from_errno(rc);
+ return notifier_from_errno(rc);
}
static struct notifier_block cpu_nfb = {
/* Encapsulate (negative) errno value. */
static inline int notifier_from_errno(int err)
{
- return NOTIFY_STOP_MASK | -err;
+ return err ? (NOTIFY_STOP_MASK | -err) : NOTIFY_DONE;
}
/* Restore (negative) errno value from notify return value. */
static inline int notifier_to_errno(int ret)
{
- return -(ret & ~NOTIFY_STOP_MASK);
+ return (ret == NOTIFY_DONE) ? 0 : -(ret & ~NOTIFY_STOP_MASK);
}
#endif /* __XEN_NOTIFIER_H__ */