mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH] mtd/core.c: fix MTDPGALG
Date: Sat, 31 Dec 2011 13:56:04 +0100	[thread overview]
Message-ID: <1325336164-25760-1-git-send-email-plagnioj@jcrosoft.com> (raw)

introduced in commit f76ad819e4971094
drivers/mtd: cosmetic changes

it's supposed to the invert of the writesize - 1

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
Hi,

	Robert please test more carefully next time

	I spend time to debug this while working on at91 nand boot :(

Best Regards,
J.
 drivers/mtd/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 55d845d..f25863d 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -49,7 +49,7 @@ static 	ssize_t mtd_read(struct cdev *cdev, void* buf, size_t count,
 }
 
 #define NOTALIGNED(x) (x & (mtd->writesize - 1)) != 0
-#define MTDPGALG(x) ((x) & (mtd->writesize - 1))
+#define MTDPGALG(x) ((x) & ~(mtd->writesize - 1))
 
 #ifdef CONFIG_MTD_WRITE
 static int all_ff(const void *buf, int len)
-- 
1.7.7


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2011-12-31 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-31 12:56 Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-12-31 23:28 ` Robert Jarzmik
2012-01-02 16:07 ` Eric Bénard

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=1325336164-25760-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@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