[PATCH 3/3] nvme: Make controller state visible via sysfs

Christoph Hellwig hch at lst.de
Mon Dec 5 07:37:31 PST 2016


> +	return sprintf(buf, "%s\n",
> +		       (unsigned)ctrl->state < ARRAY_SIZE(state_name) ?
> +		       state_name[ctrl->state] : "???");

I'd use an if here instead of the ? : and print unknown instead of the ???

Otherwise this looks fine to me:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the Linux-nvme mailing list