From: Artem Bityutskiy <dedekind@infradead.org>
To: Bruce Leonard <brucle@earthlink.net>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Add support for > 2GiB MTD devices
Date: Wed, 27 Aug 2008 08:40:17 +0300 [thread overview]
Message-ID: <1219815617.18027.132.camel@sauron> (raw)
In-Reply-To: <48AB3AAF.3010504@earthlink.net>
Hi Bruce,
On Tue, 2008-08-19 at 14:27 -0700, Bruce Leonard wrote:
> +/*
> + * Inline function for determining the size of the MTD device, independant
> + * of old or new way of doing things.
> + *
> + */
> +static inline u_int64_t device_size(struct mtd_info *a)
> +{
> + return a->num_eraseblocks == 0 ? a->size : a->num_eraseblocks * a->erasesize;
> +}
I do not think it is a good idea to do multiplication every time we need
MTD device size. It is unnecessarily large overhead in terms of speed
and code size.
Did you consider a possibility of just making mtd->size 64 bit?
Or using eraseblock:offset pairs instead of absolute address?
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2008-08-27 5:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 21:27 [PATCH 2/2] Add support for > 2GiB MTD devices Bruce Leonard
2008-08-27 5:40 ` Artem Bityutskiy [this message]
2008-08-27 7:15 ` Bruce Leonard
2008-08-27 18:18 ` Bruce_Leonard
2008-08-27 18:51 ` Jamie Lokier
2008-08-27 21:52 ` Carl-Daniel Hailfinger
2008-08-27 22:32 ` Trent Piepho
2008-08-28 17:48 ` Bruce_Leonard
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=1219815617.18027.132.camel@sauron \
--to=dedekind@infradead.org \
--cc=brucle@earthlink.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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