Hi Sam, On Mon, Mar 04, 2019 at 01:02:52PM +0100, Sam Ravnborg wrote: > Hi Sascha > > On Mon, Mar 04, 2019 at 12:38:21PM +0100, Sascha Hauer wrote: > > +/** > > + * spd_read_eeprom - Read contents of a SPD EEPROM > > + * @ctx: Context pointer for the xfer function > > + * @xfer: I2C message transfer function > > + * @addr: I2C bus address for the EEPROM > > + * @buf: buffer to read the SPD data to > It is not obvious what buffer size to provide here. > And if it happens to be SPD_MEMTYPE_DDR4 then we suddenly start to > write data at offset 256 in the buffer. > So maybe add a small comment that this should always be 512 bytes. > Or even better 2 x SPD_PAGE_SIZE (defined to 256) Make sense, I added such a comment. Thanks Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox