[RFC v4 1/1] nvme: add passthrough admin error logging opt-in

hch at lst.de hch at lst.de
Fri Apr 7 00:48:18 PDT 2023


On Fri, Apr 07, 2023 at 04:45:59AM +0000, Chaitanya Kulkarni wrote:
> +       const char *device_name = dev_name(nr->ctrl->device);
> 
> +       if (ns)
> +               device_name = ns->disk ? ns->disk->disk_name : "?";

I don't see how ns->disk could ever be NULL here.  So this could
be a simple

	ns ? ns->disk->disk->name : dev_name(nr->ctrl->device)

in the parameter list.  We'd still need to also call
nvme_get_admin_opcode_str to get the actual command name as well.




More information about the Linux-nvme mailing list