[PATCH] mmc: at91_mci: correct kunmap_atomic()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nicolas Ferre
Date: Wednesday, March 3, 2010 - 7:17 am

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] mmc: at91_mci: fix pointer errors, Nicolas Ferre, (Fri Feb 26, 11:39 am)
[PATCH 2/7] mmc: at91_mci: fix timeout errors, Nicolas Ferre, (Fri Feb 26, 11:39 am)
[PATCH 3/7] mmc: at91_mci: use one coherent DMA buffer, Nicolas Ferre, (Fri Feb 26, 11:39 am)
[PATCH 4/7] mmc: at91_mci: use DMA buffer for read, Nicolas Ferre, (Fri Feb 26, 11:39 am)
[PATCH 5/7] mmc: at91_mci: enable large data blocks, Nicolas Ferre, (Fri Feb 26, 11:39 am)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Dan Carpenter, (Fri Feb 26, 1:20 pm)
Re: [PATCH 4/7] mmc: at91_mci: use DMA buffer for read, Andrew Morton, (Tue Mar 2, 2:34 pm)
Re: [PATCH 4/7] mmc: at91_mci: use DMA buffer for read, Wolfgang =?iso-8859- ..., (Wed Mar 3, 12:34 am)
[PATCH] mmc: at91_mci: correct kunmap_atomic(), Nicolas Ferre, (Wed Mar 3, 7:17 am)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Chris Ball, (Fri Aug 27, 12:33 pm)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Chris Ball, (Fri Aug 27, 12:34 pm)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Ryan Mallon, (Sun Aug 29, 2:39 pm)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Wolfgang Mües, (Sun Aug 29, 11:51 pm)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Wolfgang Mües, (Sun Aug 29, 11:56 pm)
Re: [PATCH 1/7] mmc: at91_mci: fix pointer errors, Ryan Mallon, (Mon Aug 30, 12:05 am)