From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 6 Sep 2013 17:24:20 -0400 Subject: [U-Boot] fs: fat: don't call disk_write with zero sector num In-Reply-To: <1374659730-2634-1-git-send-email-josh.wu@atmel.com> References: <1374659730-2634-1-git-send-email-josh.wu@atmel.com> Message-ID: <20130906212420.GD13581@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jul 24, 2013 at 05:55:30PM +0800, Wu, Josh wrote: > In the set_cluster() function, it will convert the buffer size to sector > numbers. Then call disk_write() to write by sector. > For remaining buffer, the size is less than a sector, call disk_write() > again to write them in one sector. > > But if the total buffer size is less then one sector, the original code > will call disk_write() with zero sector number. It is unnecessary. > So this patch fix this. Now it will not call disk_write() if total buffer size > is less than one sector. > > Signed-off-by: Josh Wu Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: