From: Wolfgang Denk Date: Sat, 01 Oct 2011 21:52:26 +0200 Subject: [U-Boot] [PATCH 2/2] fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS In-Reply-To: <201108192337.46310.sshtylyov@ru.mvista.com> References: <201108192337.46310.sshtylyov@ru.mvista.com> Message-ID: <20111001195226.BF40518E5B23@gemini.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 Dear Sergei Shtylyov, In message <201108192337.46310.sshtylyov@ru.mvista.com> you wrote: > Currently in do_fat_read() when reading FAT sectors, we have to divide down > LINEAR_PREFETCH_SIZE by the sector size, whereas it's defined as 2 sectors > worth of bytes. In order to avoid redundant multiplication/division, introduce > #define PREFETCH_BLOCKS instead of #define LINEAR_PREFETCH_SIZE. > > Signed-off-by: Sergei Shtylyov > > --- > Slight optimization atop of commit 3831530dcb7b71329c272ccd6181f8038b6a6dd0 > (VFAT: fix processing of scattered long file name entries) and my recently > submitted patch fixing crash with big sector size. > > The patch was generated atop of the below patches posted earlier: > http://marc.info/?l=u-boot&m=131283284822789 > http://marc.info/?l=u-boot&m=131283289722891 > > fs/fat/fat.c | 9 ++++----- > include/fat.h | 2 +- > 2 files changed, 5 insertions(+), 6 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I've been programming for (35-9=) 24 years myself, and I find the best way to learn a new language is to *read* every example snippet I can find, with a reference book close by. Eventually, the *rhythm* of the language starts pounding in my head... and my fluency is close at hand. That's how I learned Perl, and now I'm one of the drummers. :-) -- Randal L. Schwartz in <8cvi6p2tir.fsf@gadget.cscaper.com>