public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andrew Ruder <andrew.ruder@elecsyscorp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mtd, cfi, ubi: add missing writebufsize initialization
Date: Wed, 5 Nov 2014 13:20:00 -0600	[thread overview]
Message-ID: <20141105192000.GB12864@og3k> (raw)
In-Reply-To: <1414751385-14613-1-git-send-email-hs@denx.de>

On Fri, Oct 31, 2014 at 11:29:45AM +0100, Heiko Schocher wrote:
> diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c
> index ac805ff..709a486 100644
> --- a/drivers/mtd/cfi_mtd.c
> +++ b/drivers/mtd/cfi_mtd.c
> @@ -226,6 +226,7 @@ int cfi_mtd_init(void)
>  		mtd->flags		= MTD_CAP_NORFLASH;
>  		mtd->size		= fi->size;
>  		mtd->writesize		= 1;
> +		mtd->writebufsize	= mtd->writesize;

Sorry I didn't see this patch up front!

My only nit-pick is that this is effectively ignoring the write buffer
present on many (most? all?) NOR flashes since this field is supposed to
be the maximum write buffer size, not the minimum write buffer size
(judging by its user ubifs and associated comments).  As such, this
really should be fi->buffer_size IMO, not mtd->writesize (i.e. 1).  But, the
only user of this field seems to be ubifs (not even ubi) for writes so
I'm just not sure it really matters.

Cheers,
Andy

  reply	other threads:[~2014-11-05 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 10:29 [U-Boot] [PATCH v2] mtd, cfi, ubi: add missing writebufsize initialization Heiko Schocher
2014-11-05 19:20 ` Andrew Ruder [this message]
2014-11-05 20:05   ` Andrew Ruder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141105192000.GB12864@og3k \
    --to=andrew.ruder@elecsyscorp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox