On Thu, Jan 14, 2021 at 03:22:50PM +0800, zhenwei pi wrote: > +static void nvme_get_smart_warning(Object *obj, Visitor *v, const char *name, > + void *opaque, Error **errp) > +{ > + NvmeCtrl *s = NVME(obj);
With only one exception, all variables of type 'NvmeCtrl' in this program are called 'n', so let's keep that consistency please. Otherwise, this looks fine. > + uint8_t value = s->smart_critical_warning; > + > + visit_type_uint8(v, name, &value, errp); > +} > + > +static void nvme_set_smart_warning(Object *obj, Visitor *v, const char *name, > + void *opaque, Error **errp) > +{ > + NvmeCtrl *s = NVME(obj);