+ lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/scatterlist: use page iterator in the mapping iterator
has been added to the -mm tree.  Its filename is
     lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Imre Deak <imre.deak@xxxxxxxxx>
Subject: lib/scatterlist: use page iterator in the mapping iterator

- The dw_mmc driver used sg_mapping_iter::__sg, which was marked as
  internal and moved by this patch to the new sg_page_iter struct.  This
  caused a compile time breakage for the driver.  Fix this by making
  sg_mapping_iter::piter a public interface and making the driver use
  sg_mapping_iter::piter.sg instead of sg_mapping_iter::__sg.  Thanks to
  James Hogan for pointing this out.

Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: James Hogan <james.hogan@xxxxxxxxxx> 
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/mmc/host/dw_mmc.c   |    4 ++--
 include/linux/scatterlist.h |    2 +-
 lib/scatterlist.c           |   10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff -puN drivers/mmc/host/dw_mmc.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix drivers/mmc/host/dw_mmc.c
--- a/drivers/mmc/host/dw_mmc.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix
+++ a/drivers/mmc/host/dw_mmc.c
@@ -1453,7 +1453,7 @@ static void dw_mci_read_data_pio(struct 
 		if (!sg_miter_next(sg_miter))
 			goto done;
 
-		host->sg = sg_miter->__sg;
+		host->sg = sg_miter->piter.sg;
 		buf = sg_miter->addr;
 		remain = sg_miter->length;
 		offset = 0;
@@ -1508,7 +1508,7 @@ static void dw_mci_write_data_pio(struct
 		if (!sg_miter_next(sg_miter))
 			goto done;
 
-		host->sg = sg_miter->__sg;
+		host->sg = sg_miter->piter.sg;
 		buf = sg_miter->addr;
 		remain = sg_miter->length;
 		offset = 0;
diff -puN include/linux/scatterlist.h~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix include/linux/scatterlist.h
--- a/include/linux/scatterlist.h~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix
+++ a/include/linux/scatterlist.h
@@ -293,10 +293,10 @@ struct sg_mapping_iter {
 	void			*addr;		/* pointer to the mapped area */
 	size_t			length;		/* length of the mapped area */
 	size_t			consumed;	/* number of consumed bytes */
+	struct sg_page_iter	piter;		/* page iterator */
 
 	/* these are internal states, keep away */
 	unsigned int		__offset;	/* offset within page */
-	struct sg_page_iter	__piter;	/* page iterator */
 	unsigned int		__remaining;	/* remaining bytes on page */
 	unsigned int		__flags;
 };
diff -puN lib/scatterlist.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix lib/scatterlist.c
--- a/lib/scatterlist.c~lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix
+++ a/lib/scatterlist.c
@@ -449,7 +449,7 @@ void sg_miter_start(struct sg_mapping_it
 {
 	memset(miter, 0, sizeof(struct sg_mapping_iter));
 
-	__sg_page_iter_start(&miter->__piter, sgl, nents, 0);
+	__sg_page_iter_start(&miter->piter, sgl, nents, 0);
 	WARN_ON(!(flags & (SG_MITER_TO_SG | SG_MITER_FROM_SG)));
 	miter->__flags = flags;
 }
@@ -484,17 +484,17 @@ bool sg_miter_next(struct sg_mapping_ite
 		struct scatterlist *sg;
 		unsigned long pgoffset;
 
-		if (!__sg_page_iter_next(&miter->__piter))
+		if (!__sg_page_iter_next(&miter->piter))
 			return false;
 
-		sg = miter->__piter.sg;
-		pgoffset = miter->__piter.sg_pgoffset;
+		sg = miter->piter.sg;
+		pgoffset = miter->piter.sg_pgoffset;
 
 		miter->__offset = pgoffset ? 0 : sg->offset;
 		miter->__remaining = sg->offset + sg->length -
 				(pgoffset << PAGE_SHIFT) - miter->__offset;
 	}
-	miter->page = miter->__piter.page;
+	miter->page = miter->piter.page;
 	miter->consumed = miter->length = miter->__remaining;
 
 	if (miter->__flags & SG_MITER_ATOMIC)
_

Patches currently in -mm which might be from imre.deak@xxxxxxxxx are

linux-next.patch
lib-scatterlist-add-simple-page-iterator.patch
lib-scatterlist-use-page-iterator-in-the-mapping-iterator.patch
lib-scatterlist-use-page-iterator-in-the-mapping-iterator-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux