From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 25 Jul 2013 16:46:20 +0200 Subject: [U-Boot] [PATCH v6 04/12] cfi_flash: use buffer length in unmap_physmem() In-Reply-To: <1372909244-25211-5-git-send-email-dantesu@gmail.com> References: <1372909244-25211-1-git-send-email-dantesu@gmail.com> <1372909244-25211-5-git-send-email-dantesu@gmail.com> Message-ID: <51F13A3C.7000606@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/04/2013 05:40 AM, Kuo-Jung Su wrote: > From: Kuo-Jung Su > > While the flash_detect_legacy() of drivers/mtd/cfi_flash.c > feed unmap_physmem() with MAP_NOCACHE as 2nd parameter, > the do_spi_flash_read_write() of common/cmd_sf.c > feed unmap_physmem() with the length of the mapped buffer > as 2nd parameter. > > It's apparently a bug, and I personally think the 2nd parameter > should be the length of the mapped buffer. > > Signed-off-by: Kuo-Jung Su > CC: Albert Aribaud > CC: Stefan Roese Applied to u-boot-cfi-flash. Thanks, Stefan