mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: akpm@linux-foundation.org, linux-mmc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, wolfgang.mues@auerswald.de,
	avictor.za@gmail.com, Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: [PATCH] mmc: at91_mci: correct kunmap_atomic()
Date: Wed,  3 Mar 2010 15:17:35 +0100	[thread overview]
Message-ID: <1267625855-32695-1-git-send-email-nicolas.ferre@atmel.com> (raw)
In-Reply-To: <20100302133434.761df661.akpm@linux-foundation.org>

kunmap_atomic() accepts a pointer to any location in the page so we do not need
the subtraction and cast.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Andrew,
I created a new patch that you can stack at the top of the previous
patch series. I guess that you cannot fold it in other patches as the
kunmap_atomic() correction impacts two different patches.

Thanks.

 drivers/mmc/host/at91_mci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 55507da..91dc60c 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -248,7 +248,7 @@ static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data
 			dmabuf = (unsigned *)tmpv;
 		}
 
-		kunmap_atomic(((void *)sgbuffer) - sg->offset, KM_BIO_SRC_IRQ);
+		kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
 
 		if (size == 0)
 			break;
@@ -313,7 +313,7 @@ static void at91_mci_post_dma_read(struct at91mci_host *host)
 			dmabuf = (unsigned *)tmpv;
 		}
 
-		kunmap_atomic(((void *)sgbuffer)-sg->offset, KM_BIO_SRC_IRQ);
+		kunmap_atomic(sgbuffer, KM_BIO_SRC_IRQ);
 		dmac_flush_range((void *)sgbuffer, ((void *)sgbuffer) + amount);
 		data->bytes_xfered += amount;
 		if (size == 0)
-- 
1.5.6.5


  parent reply	other threads:[~2010-03-03 13:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 18:39 [PATCH 1/7] mmc: at91_mci: fix pointer errors Nicolas Ferre
2010-02-26 18:39 ` [PATCH 2/7] mmc: at91_mci: fix timeout errors Nicolas Ferre
2010-02-26 18:39 ` [PATCH 3/7] mmc: at91_mci: use one coherent DMA buffer Nicolas Ferre
2010-02-26 18:39 ` [PATCH 4/7] mmc: at91_mci: use DMA buffer for read Nicolas Ferre
2010-03-02 21:34   ` Andrew Morton
2010-03-03  7:34     ` Wolfgang Mües
2010-03-03 14:17     ` Nicolas Ferre [this message]
2010-02-26 18:39 ` [PATCH 5/7] mmc: at91_mci: enable large data blocks Nicolas Ferre
2010-02-26 18:39 ` [PATCH 6/7] mmc: at91_mci: Enable MMC_CAP_SDIO_IRQ only when it actually works Nicolas Ferre
2010-02-26 18:39 ` [PATCH 7/7] mmc: at91_mci: introduce per-mci-revision conditional code Nicolas Ferre
2010-02-26 20:20 ` [PATCH 1/7] mmc: at91_mci: fix pointer errors Dan Carpenter
2010-08-27 19:33 ` Chris Ball
2010-08-27 19:34   ` Chris Ball
2010-08-30  6:51     ` Wolfgang Mües
2010-08-29 21:39   ` Ryan Mallon
2010-08-30  6:56     ` Wolfgang Mües
2010-08-30  7:05       ` Ryan Mallon

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=1267625855-32695-1-git-send-email-nicolas.ferre@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=akpm@linux-foundation.org \
    --cc=avictor.za@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=wolfgang.mues@auerswald.de \
    /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

all inboxes | Powered by JetHome®