[PATCH rebased] Use the new sg_page() helper

Previous thread: const vs __{dev}initdata by Bartlomiej Zolnierkiewicz on Tuesday, October 23, 2007 - 2:35 pm. (4 messages)

Next thread: [PATCH 1/1] cciss: update copyright notices by Mike Miller on Tuesday, October 23, 2007 - 2:54 pm. (2 messages)
From: Emil Medve
Date: Tuesday, October 23, 2007 - 10:32 am

Fix build error messages such as this:

In file included from include/linux/dma-mapping.h:52,
                 from include/linux/dmaengine.h:29,
                 from include/linux/skbuff.h:29,
                 from include/linux/netlink.h:155,
                 from include/linux/genetlink.h:4,
                 from include/net/genetlink.h:4,
                 from include/linux/taskstats_kern.h:12,
                 from init/main.c:46:
include/asm/dma-mapping.h: In function 'dma_map_sg':
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'page'
include/asm/dma-mapping.h:290: error: 'struct scatterlist' has no member named 'page'

This change in the struct scatterlist was introduced by this commit: 18dabf473e15850c0dbc8ff13ac1e2806d542c15

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---

linux-2.6> scripts/checkpatch.pl 0001-Use-the-new-sg_page-helper.patch 
Your patch has no obvious style problems and is ready for submission.

 drivers/mmc/host/mmci.h          |    4 ++--
 include/asm-xtensa/dma-mapping.h |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index 000e6a9..de3c223 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
@@ -112,7 +112,7 @@
  * The size of the FIFO in bytes.
  */
 #define MCI_FIFOSIZE	(16*4)
-	
+
 #define MCI_FIFOHALFSIZE (MCI_FIFOSIZE / 2)
 
 #define NR_SG		16
@@ -169,7 +169,7 @@ static inline char *mmci_kmap_atomic(struct mmci_host *host, unsigned long *flag
 	struct scatterlist *sg = host->sg_ptr;
 
 	local_irq_save(*flags);
-	return kmap_atomic(sg->page, KM_BIO_SRC_IRQ) + sg->offset;
+	return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
 }
 
 static inline void mmci_kunmap_atomic(struct mmci_host *host, void *buffer, ...
From: Linus Torvalds
Date: Tuesday, October 23, 2007 - 3:32 pm

Please write "page_address(sg_page(sg)) + sg->offset" as "sg_virt(sg)" 
instead.

And send the patch to Jens, since he's the person who is in charge of 
getting this all sorted out ;)

Ok?

		Linus
-

Previous thread: const vs __{dev}initdata by Bartlomiej Zolnierkiewicz on Tuesday, October 23, 2007 - 2:35 pm. (4 messages)

Next thread: [PATCH 1/1] cciss: update copyright notices by Mike Miller on Tuesday, October 23, 2007 - 2:54 pm. (2 messages)