[PATCH v2] nvme: update firmware version after commit
Niklas Cassel
Niklas.Cassel at wdc.com
Fri Oct 13 13:37:32 PDT 2023
On Fri, Oct 13, 2023 at 10:43:48AM -0600, Keith Busch wrote:
> On Fri, Oct 13, 2023 at 06:34:20PM +0200, Daniel Wagner wrote:
> > if (nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_FW_SLOT, 0, NVME_CSI_NVM,
> > - log, sizeof(*log), 0))
> > + log, sizeof(*log), 0)) {
> > dev_warn(ctrl->device, "Get FW SLOT INFO log error\n");
> > + goto out_free_log;
> > + }
> > +
> > + afi = le64_to_cpu(log->afi);
BTW, this field is a single byte, so there should be no need to
use *_to_cpu() on this. (Byte order is only important when the
field is more than one byte.)
Kind regards,
Niklas
More information about the Linux-nvme
mailing list