public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: David Peverley <pev@sketchymonkey.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Understanding OOB data read implementation (II)
Date: Sat, 16 Oct 2010 22:37:22 +0300	[thread overview]
Message-ID: <1287257842.1781.43.camel@brekeke> (raw)
In-Reply-To: <AANLkTi=+2kVMg+YegwRe1SkWWWfF3-=4ZRmvciBZLkCy@mail.gmail.com>

On Fri, 2010-10-15 at 12:29 +0100, David Peverley wrote:
> Hi again...!
> 
> I've also noticed after blindly copying it that in the DoC drivers
> that the OOB reads use the ops->len for size :
>     static int doc_read_oob(struct mtd_info *mtd, loff_t ofs,
>                             struct mtd_oob_ops *ops)
>         ...
>         uint8_t *buf = ops->oobbuf;
>         size_t len = ops->len;
>         ...
> 
> Reading mtd.h and the following patch summary :
>     http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg03799.html
> 
> I suspect this is wrong and should be using ops->ooblen instead. This
> is especially true given that mtdchar.c leaves ops->len
> uninitialised....! (should mtdchar.c:mtd_do_readoob() not zero the ops
> structure as it's a local automatic so not zero-initialised?) Again
> this is copied in doc2001.c and doc2001plus.c.

If you can test the change - please send a patch.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2010-10-16 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15 11:29 Understanding OOB data read implementation (II) David Peverley
2010-10-16 19:37 ` Artem Bityutskiy [this message]

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=1287257842.1781.43.camel@brekeke \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pev@sketchymonkey.com \
    /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