Re: [PATCH RFC V2 1/3] block: put runtime PM code into common helpers

Christoph Hellwig
2018-07-17T13:21:17Z

> #ifdef CONFIG_PM
> +static int __blk_pre_runtime_suspend(struct request_queue *q, bool active)
> +{
> + int ret;
> +
> + if (active) {
> + ret = -EBUSY;
> + pm_runtime_mark_last_busy(q->dev);
> + } else {
> + ret = 0;
> + q->rpm_status = RPM_SUSPENDING;
> + }
> +
> + return ret;
> +}

Why not:

if (active) {
pm_runtime_mark_last_busy(q->dev);
return -EBUSY;
}

q->rpm_status = RPM_SUSPENDING;
return 0;