All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>, Jehan Bing <jehan@orb.com>,
	linux-mtd@lists.infradead.org,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH 09/10] mtd-utils: nanddump: type consistency
Date: Tue, 09 Nov 2010 10:19:40 -0800	[thread overview]
Message-ID: <4CD990BC.6040800@gmail.com> (raw)
In-Reply-To: <AANLkTinGe84r8mo84HQVikPqQxLrKnwrXa20E_rfN=0f@mail.gmail.com>

On 11/9/2010 1:51 AM, Mike Frysinger wrote:
> On Wed, Nov 3, 2010 at 04:27, Brian Norris wrote:
>>  nandwrite.c |    6 +++---
> 
> the subject says "nanddump" ...

Oops, I'll change that if I send a "v2".

>> --- a/nandwrite.c
>> +++ b/nandwrite.c
>> @@ -262,7 +262,7 @@ int main(int argc, char * const argv[])
>>        long long blockstart = -1;
>>        struct mtd_dev_info mtd;
>>        struct mtd_oob_buf oob;
>> -       loff_t offs;
>> +       long long offs;
>>        int ret;
>>        int oobinfochanged = 0;
>>        struct nand_oobinfo old_oobinfo;
> 
> i dont think this is quite right.  "offs" is given to an ioctl which
> takes __kernel_loff_t ... we shouldnt assume "long long" and
> "__kernel_loff_t" are always the same.

This problem is sort of a "which comes first" question for me: I put
this patch before patch 10, where in patch 10, the ioctl in question is
replaced with an entirely different call to "mtd_is_bad".

In the new usage (patch 10), "mtd_is_bad" needs the eraseblock number as
an int, so there's some arithmetic going on ("offs" divided by ebsize)
that passes an int to "mtd_is_bad".

I was just trying to unify the usage of different 64-bit data types, and
after patch 10, there's no need to be using the "loff_t" type. However,
if it makes more sense, I can rearrange patch 9 and 10 such that the
type change comes after the ioctl is no longer called directly.

Thanks,
Brian

  reply	other threads:[~2010-11-09 18:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03  8:27 [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths Brian Norris
2010-11-03  8:27 ` [PATCH 02/10] mtd-utils: nandwrite: Comment, style fixups Brian Norris
2010-11-03  8:27 ` [PATCH 03/10] mtd-utils: nandwrite: Clarify usage of aligned "erasesize" Brian Norris
2010-11-03  8:27 ` [PATCH 04/10] mtd-utils: nandwrite: switch "oobsize" for "writesize" Brian Norris
2010-11-03  8:27 ` [PATCH 05/10] mtd-utils: nandwrite: Use libmtd to get correct mtd parameters Brian Norris
2010-11-03  8:27 ` [PATCH 06/10] mtd-utils: nandwrite: Use 64-bit offset Brian Norris
2010-11-13 11:48   ` Artem Bityutskiy
2010-11-13 22:45     ` Mike Frysinger
2010-11-14  7:49       ` Artem Bityutskiy
2010-11-03  8:27 ` [PATCH 07/10] mtd-utils: nandwrite: avoid NULL buffer pointers Brian Norris
2010-11-03  8:27 ` [PATCH 08/10] mtd-utils: nandwrite: prevent 32-bit overflow Brian Norris
2010-11-09  9:48   ` Mike Frysinger
2010-11-11  6:31     ` [PATCH v2 " Brian Norris
2010-11-09 12:20   ` [PATCH " Artem Bityutskiy
2010-11-03  8:27 ` [PATCH 09/10] mtd-utils: nanddump: type consistency Brian Norris
2010-11-09  9:51   ` Mike Frysinger
2010-11-09 18:19     ` Brian Norris [this message]
2010-11-10  0:00       ` Mike Frysinger
2010-11-11  6:39         ` [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/ libmtd Brian Norris
2010-11-13 11:53           ` Artem Bityutskiy
2010-11-16 17:06             ` Brian Norris
2010-11-16 19:57               ` Mike Frysinger
2010-11-11  6:39         ` [PATCH v2 10/10] mtd-utils: nandwrite: type consistency Brian Norris
2010-11-03  8:27 ` [PATCH 10/10] mtd-utils: nandwrite: full 64-bit support w/ libmtd Brian Norris
2010-11-09  9:54 ` [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths Mike Frysinger
2010-11-13 11:31 ` Artem Bityutskiy
2010-11-13 11:37   ` Artem Bityutskiy
2010-11-13 11:55 ` Artem Bityutskiy

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=4CD990BC.6040800@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jehan@orb.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier.adi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.