public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Josh Boyer <jdub@us.ibm.com>
Cc: tom_gall@vnet.ibm.com, linux-mtd@lists.infradead.org, sallyt@us.ibm.com
Subject: Re: [PATCH] Add error checking to slram
Date: Mon, 10 Jan 2005 15:55:41 +0100	[thread overview]
Message-ID: <20050110145541.GD12520@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <1105368075.10074.4.camel@windu.rchland.ibm.com>

On Mon, 10 January 2005 08:41:15 -0600, Josh Boyer wrote:
> On Sat, 2005-01-08 at 21:51 +0100, Jörn Engel wrote:
> > On Wed, 5 January 2005 15:50:32 -0600, Josh Boyer wrote:
> 
> > > +	if (from > mtd->size)
> > > +		return -EINVAL;
> > > +
> > > +	if (from + len > mtd->size)
> > > +		len = mtd->size - from;
> > > +
> > 
> > My code is slightly different:
> > 	if (len > mtd->size - from)
> > 		...
> > 
> > And yes, this _can_ make a difference. ;)
> 
> It's early and I haven't had my coffee yet :).  Care to educate me on
> why that makes a difference?

from = (uint32_t) -50;
len = 100;

Currently, I wouldn't dare creating a 4GiB mtd. ;)

Jörn

-- 
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong

      reply	other threads:[~2005-01-10 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-05 21:50 [PATCH] Add error checking to slram Josh Boyer
2005-01-08 20:51 ` Jörn Engel
2005-01-10 14:41   ` Josh Boyer
2005-01-10 14:55     ` Jörn Engel [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=20050110145541.GD12520@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=jdub@us.ibm.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sallyt@us.ibm.com \
    --cc=tom_gall@vnet.ibm.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