[PATCH V9 1/1] nvme: allow passthru cmd error logging

Chaitanya Kulkarni chaitanyak at nvidia.com
Wed Jan 31 14:54:12 PST 2024


> +static ssize_t nvme_adm_passthru_err_log_enabled_show(struct device *dev,
> +		struct device_attribute *attr, char *buf)
> +{
> +	struct nvme_ctrl *ctrl = dev_get_drvdata(dev);
> +
> +	return sysfs_emit(buf, ctrl->passthru_err_log_enabled ? "on" : "off");
> +}
> +

just like in nvme_io_passthru_err_log_enable_show() see below we need "\n"
to be consistent:-

return sysfs_emit(buf, ctrl->passthru_err_log_enabled ? "on\n" : "off\n");

with that Looks good.

Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

[...]

> tatic ssize_t nvme_io_passthru_err_log_enabled_show(struct device *dev,
> +		struct device_attribute *attr, char *buf)
> +{
> +	struct nvme_ns *n = dev_get_drvdata(dev);
> +
> +	return sysfs_emit(buf, n->passthru_err_log_enabled ? "on\n" : "off\n");
> +}
> +
>

-ck




More information about the Linux-nvme mailing list