Messages in this thread | | | Date | Tue, 14 Jun 2022 14:30:08 -0700 | From | Keith Busch <> | Subject | Re: [PATCH 2/2] nvme: Report model,sn,fw,pci device information during init |
| |
On Tue, Jun 14, 2022 at 11:09:02PM +0200, Erwan Velu wrote: > @@ -2982,6 +2982,14 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl) > return -EIO; > } > > + /* Reporting model, serial, firmware and pci info */ > + dev_info(ctrl->device, "MODEL:%s SN:%s FW:%s PCI_ID:%04x:%04x\n", > + id->mn, > + id->sn, > + id->fr, > + le16_to_cpu(id->vid), > + le16_to_cpu(id->ssvid));
We don't need to print this on every controller reset, so I think this needs to be within the "if (!ctrl->identified)" block.
And since you can't just null terminate the these strings, you should use the "%*s" format.
I'm unsure if the serial number should be logged. Firmware and model are probably fine.
| |