[PATCH v2 2/2] nvme: Enable autonomous power state transitions

Keith Busch keith.busch at intel.com
Thu Jan 19 12:15:30 PST 2017


On Thu, Jan 19, 2017 at 11:55:44AM -0800, Andy Lutomirski wrote:
> +static void nvme_set_latency_tolerance(struct device *dev, s32 val)
> +{
> +	struct nvme_ctrl *ctrl = dev_get_drvdata(dev);
> +
> +	u64 latency;
> +
> +	if (val == PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT ||
> +	    val == PM_QOS_LATENCY_ANY)
> +		latency = U64_MAX;
> +	else
> +		latency = val;
> +
> +	if (ctrl->ps_max_latency_us != val) {
> +		ctrl->ps_max_latency_us = val;

Did you mean to use 'latency' here instead of 'val'? Otherwise, I don't
see why the latency variable exists.

> +		nvme_configure_apst(ctrl);
> +	}
> +}



More information about the Linux-nvme mailing list