From patchwork Wed Apr 10 07:11:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: egbert.eich@gmail.com X-Patchwork-Id: 235312 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 594C22C00C6 for ; Wed, 10 Apr 2013 17:13:27 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C8A834A033; Wed, 10 Apr 2013 09:13:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EwYHqWJuUZ+6; Wed, 10 Apr 2013 09:13:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E2584A026; Wed, 10 Apr 2013 09:13:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CA034A026 for ; Wed, 10 Apr 2013 09:13:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iwg0Gtx+7pvW for ; Wed, 10 Apr 2013 09:13:09 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by theia.denx.de (Postfix) with ESMTPS id 6FD154A025 for ; Wed, 10 Apr 2013 09:13:07 +0200 (CEST) Received: by mail-wi0-f170.google.com with SMTP id hm11so5805736wib.5 for ; Wed, 10 Apr 2013 00:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=tf1VhbJ4yJhBDdtdWBeEH27SaRKg8mXhCMcZNZp2y2w=; b=Vye92rkjCghYV3UtP6bf17HmRChk97ceyo1YTZT95L+FehxHGCUh8XutDeZRiketf9 7cv6+gdNH/YENUbJRWY9KLkt0hlbkcEGpnNuAl0JsfdLNyaPXfJnyTzxrDgqLUGlswUq oU53pfyOS3C5GTFoOhKgi3ihsnpu3WZv5KgfsF1wWrW0+zSJo0/+hgklPO2A/deaEBEU OXRXOlbOUyVyT3Q0xza4QCE4+BgEf6MgTsPsHGpM7WZedrZaLyQPWq4ZcBd/dtOG1lXB jVeAZ7eea46HZczLvbvj1APi0X6VOCyo6TtRCyj+YJay0KK59J5GCssK9Se39HY8hB5/ E/Ig== X-Received: by 10.180.149.227 with SMTP id ud3mr29449294wib.0.1365577982688; Wed, 10 Apr 2013 00:13:02 -0700 (PDT) Received: from debian (p5DCF071E.dip0.t-ipconnect.de. [93.207.7.30]) by mx.google.com with ESMTPS id fp2sm29917985wib.7.2013.04.10.00.13.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Apr 2013 00:13:01 -0700 (PDT) Received: from sles11.fritz.box (sles11.fritz.box [192.168.178.22]) by debian (Postfix) with ESMTP id 5666813C78; Wed, 10 Apr 2013 09:12:59 +0200 (CEST) From: Egbert Eich To: u-boot@lists.denx.de Date: Wed, 10 Apr 2013 09:11:55 +0200 Message-Id: <1365577917-32563-3-git-send-email-egbert.eich@gmail.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1365577917-32563-1-git-send-email-egbert.eich@gmail.com> References: <1365577917-32563-1-git-send-email-egbert.eich@gmail.com> Cc: Egbert Eich Subject: [U-Boot] [PATCH v2 2/4] fs/fat: Don't multiply fatsize with sector size X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Egbert Eich Bugfix: Here at this place we need the fat size in sectors not bytes. This was found during code review when adding support for storage devices with blocksizes != 512. Signed-off-by: Egbert Eich --- Changes for v2: - Coding style fixes. fs/fat/fat_write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index b4022aa..fd07240 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -120,7 +120,6 @@ static int flush_fat_buffer(fsdata *mydata) __u8 *bufptr = mydata->fatbuf; __u32 startblock = mydata->fatbufnum * FATBUFBLOCKS; - fatlength *= mydata->sect_size; startblock += mydata->fat_sect; if (getsize > fatlength)