From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Darren Garnier <dgarnier@reinrag.net>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] mtd: fix erasesize math for non power-of-2 devices
Date: Tue, 03 Sep 2013 20:04:56 +0200 [thread overview]
Message-ID: <87ppspye5z.fsf@free.fr> (raw)
In-Reply-To: <32D9025B-5882-4030-A3DA-0CC66CEBD93C@reinrag.net> (Darren Garnier's message of "Mon, 2 Sep 2013 22:22:20 -0400")
Darren Garnier <dgarnier@reinrag.net> writes:
> Signed-off-by: Darren Garnier <dgarnier@reinrag.net>
Hi Darren,
First of all, do any device exist where erasesize is non power-of-2, and if so
which one do you have in mind ?
Secondly, if such devices exist, I'd wish to have that explained in the commit
message, to know what motivated your patch.
> +#define ALIGNED_OFFSET(offset, bs) ((bs & (bs-1)) == 0) ? \
> + offset & ~(bs-1) : \
> + bs * div_u64(offset,bs)
> +#define ALIGNED_COUNT(count, bs) ((bs & (bs-1)) == 0) ? \
> + ALIGN(count,bs) : \
> + bs *
> div_u64(count+(bs-1),bs)
These lines look a bit over 80 caracters to me, or is it my editor ...
Moreover the (bs & (bs-1)) == 0 should be replaced by IS_ALIGNED(bs).
Cheers.
--
Robert
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-09-03 18:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 2:22 [PATCH 1/4] mtd: fix erasesize math for non power-of-2 devices Darren Garnier
2013-09-03 18:04 ` Robert Jarzmik [this message]
2013-09-04 6:24 ` Sascha Hauer
2013-09-03 18:16 ` Sascha Hauer
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=87ppspye5z.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=barebox@lists.infradead.org \
--cc=dgarnier@reinrag.net \
/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.