> -----Original Message----- > From: Linux-nvdimm [mailto:[email protected]] On Behalf Of > Dave Jiang > Sent: Tuesday, July 17, 2018 3:54 PM > Subject: [PATCH v5 03/12] nfit/libnvdimm: store dimm id as a member to struct > nvdimm ... > + if (dcr->valid_fields & ACPI_NFIT_CONTROL_MFG_INFO_VALID) > + sprintf(nfit_mem->id, "%04x-%02x-%04x-%08x", > + be16_to_cpu(dcr->vendor_id), > + dcr->manufacturing_location, > + be16_to_cpu(dcr->manufacturing_date), > + be32_to_cpu(dcr->serial_number)); > + else > + sprintf(nfit_mem->id, "%04x-%08x", > + be16_to_cpu(dcr->vendor_id), > + be32_to_cpu(dcr->serial_number)); ... > > +#define NFIT_DIMM_ID_LEN 25 > + char id[NFIT_DIMM_ID_LEN]; Since the longest ID is: 4+2+4+8 hex characters = 18 bytes +3 dashes = 21 bytes +1 NULL = 22 bytes, why is the define 25? Same question for this define in patch 02/12 (although there's another comment by Eric Biggers that this isn't really used, so this might be moot): > +#define NVDIMM_KEY_DESC_LEN 25 --- Robert Elliott, HPE Persistent Memory _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
RE: [PATCH v5 03/12] nfit/libnvdimm: store dimm id as a member to struct nvdimm
Elliott, Robert (Persistent Memory) Wed, 18 Jul 2018 08:41:56 -0700
- [PATCH v5 00/12] Adding security suppo... Dave Jiang
- [PATCH v5 01/12] nfit: add suppor... Dave Jiang
- [PATCH v5 04/12] nfit/libnvdimm: ... Dave Jiang
- Re: [PATCH v5 04/12] nfit/lib... Eric Biggers
- [PATCH v5 03/12] nfit/libnvdimm: ... Dave Jiang
- RE: [PATCH v5 03/12] nfit/lib... Elliott, Robert (Persistent Memory)
- Re: [PATCH v5 03/12] nfit... Dave Jiang
- [PATCH v5 02/12] libnvdimm: creat... Dave Jiang
- Re: [PATCH v5 02/12] libnvdim... Eric Biggers
- [PATCH v5 08/12] nfit/libnvdimm: ... Dave Jiang
- [PATCH v5 09/12] nfit/libnvdimm: ... Dave Jiang
- RE: [PATCH v5 09/12] nfit/lib... Elliott, Robert (Persistent Memory)
- Re: [PATCH v5 09/12] nfit... Dave Jiang
- RE: [PATCH v5 09/12] ... Elliott, Robert (Persistent Memory)
- RE: [PATCH v5 09... Li, Juston
- Re: [PATCH v5 09... Dave Jiang
