From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.karo-electronics.de ([81.173.242.67]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WMy9P-0001kG-53 for linux-mtd@lists.infradead.org; Mon, 10 Mar 2014 11:13:44 +0000 Date: Mon, 10 Mar 2014 12:13:04 +0100 From: Lothar =?UTF-8?B?V2HDn21hbm4=?= To: Akinobu Mita Subject: Re: [PATCH v3] mtd: mtd_oobtest: generate consitent data for verification Message-ID: <20140310121304.132c814f@ipc1.ka-ro> In-Reply-To: <1394205850-5366-1-git-send-email-akinobu.mita@gmail.com> References: <1394205850-5366-1-git-send-email-akinobu.mita@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: David Woodhouse , George Cherian , Brian Norris , linux-mtd@lists.infradead.org, Lee Jones List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Akinobu Mita wrote: > mtd_oobtest writes OOB, read it back and verify. The verification is > not correctly done if oobsize is not multiple of 4. Although the data > to be written and the data to be compared are generated by several > prandom_byte_state() calls starting with the same seed, these two are > generated with the different size and different number of calls. >=20 > Due to the implementation of prandom_byte_state() if the size on each > call is not multiple of 4, the resulting data is not always same. >=20 > This fixes it by just calling prandom_byte_state() once and using > correct range instead of calling it multiple times for each. >=20 With this patch the oobtest works on our i.MX53 platform. You can add my: Tested-by: Lothar Wa=C3=9Fmann --=20 ___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra=C3=9Fe 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch=C3=A4ftsf=C3=BChrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info@karo-electronics.de ___________________________________________________________