Skip to contentSkip to conversation

lib/scatterlist: Remove leftover from sg_page_iter comment

PATCH Superseded Gal Pressman 2 participants 3 messages Mar 28, 2019 – Mar 29, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/scatterlist: Remove leftover from sg_page_iter comment

Commit d901b2760dc6 ("lib/scatterlist: Provide a DMA page iterator") added the sg DMA iterator but a leftover remained in the sg_page_iter documentation, remove it.

Cc Jason Gunthorpe <[email protected]>
---
 include/linux/scatterlist.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/scatterlist.h +5 -5
index b4be960c7e5d..30a9a55c28ba 100644
@@ -340,11 +340,11 @@ int sg_alloc_table_chained(struct sg_table *table, int nents,
  * sg page iterator
  *
  * Iterates over sg entries page-by-page.  On each successful iteration, you
- * can call sg_page_iter_page(@piter) to get the current page and its dma
- * address. @piter->sg will point to the sg holding this page and
- * @piter->sg_pgoffset to the page's page offset within the sg. The iteration
- * will stop either when a maximum number of sg entries was reached or a
- * terminating sg (sg_last(sg) == true) was reached.
+ * can call sg_page_iter_page(@piter) to get the current page.
+ * @piter->sg will point to the sg holding this page and @piter->sg_pgoffset to
+ * the page's page offset within the sg. The iteration will stop either when a
+ * maximum number of sg entries was reached or a terminating sg
+ * (sg_last(sg) == true) was reached.
  */
 struct sg_page_iter {
 	struct scatterlist	*sg;		/* sg holding the page */
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Gal Pressman

Commit d901b2760dc6 ("lib/scatterlist: Provide a DMA page iterator") added the sg DMA iterator but a leftover remained in the sg_page_iter documentation, remove it.

Cc Jason Gunthorpe <[email protected]>
---
  include/linux/scatterlist.h | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/scatterlist.h +0 -0
index b4be960c7e5d..30a9a55c28ba 100644

include/linux/scatterlist.h int sg_alloc_table_chained(struct sg_table *table, int nents, · line 344

Quoted 5 lines
include/linux/scatterlist.h +0 -2
@@ -340,11 +340,11 @@ int sg_alloc_table_chained(struct sg_table *table, int nents,
   * sg page iterator
   *
   * Iterates over sg entries page-by-page.  On each successful iteration, you
- * can call sg_page_iter_page(@piter) to get the current page and its dma
- * address.

It took me a while till i exact found what you meant by left over.

could have been more specific in the commit,but

Looks  good to me to be removed.

-Mukesh

Quoted 12 lines
include/linux/scatterlist.h +5 -3
  @piter->sg will point to the sg holding this page and
- * @piter->sg_pgoffset to the page's page offset within the sg. The iteration
- * will stop either when a maximum number of sg entries was reached or a
- * terminating sg (sg_last(sg) == true) was reached.
+ * can call sg_page_iter_page(@piter) to get the current page.
+ * @piter->sg will point to the sg holding this page and @piter->sg_pgoffset to
+ * the page's page offset within the sg. The iteration will stop either when a
+ * maximum number of sg entries was reached or a terminating sg
+ * (sg_last(sg) == true) was reached.
   */
  struct sg_page_iter {

struct scatterlist *sg; /* sg holding the page */

#2 lore raw
Quoted 27 lines · Mukesh Ojha
Quoted 15 lines · Gal Pressman

Commit d901b2760dc6 ("lib/scatterlist: Provide a DMA page iterator") added the sg DMA iterator but a leftover remained in the sg_page_iter documentation, remove it.

Cc Jason Gunthorpe <[email protected]>

---
  include/linux/scatterlist.h | 10 +++++-----

  1 file changed, 5 insertions(+), 5 deletions(-)
include/linux/scatterlist.h +0 -0
index b4be960c7e5d..30a9a55c28ba 100644

include/linux/scatterlist.h int sg_alloc_table_chained(struct sg_table *table, int · line 345

Quoted 6 lines
include/linux/scatterlist.h +0 -2
@@ -340,11 +340,11 @@ int sg_alloc_table_chained(struct sg_table *table, int
 nents,
    * sg page iterator
    *
    * Iterates over sg entries page-by-page.  On each successful iteration, you
- * can call sg_page_iter_page(@piter) to get the current page and its dma
- * address.

It took me a while till i exact found what you meant by left over.

Quoted 5 lines

could have been more specific in the commit,but

Looks  good to me to be removed.

You're right, should've been more specific.
Should I resubmit?

Quoted 16 lines

-Mukesh

Quoted 12 lines

  @piter->sg will point to the sg holding this page and
- * @piter->sg_pgoffset to the page's page offset within the sg. The iteration
- * will stop either when a maximum number of sg entries was reached or a
- * terminating sg (sg_last(sg) == true) was reached.
+ * can call sg_page_iter_page(@piter) to get the current page.
+ * @piter->sg will point to the sg holding this page and @piter->sg_pgoffset to
+ * the page's page offset within the sg. The iteration will stop either when a
+ * maximum number of sg entries was reached or a terminating sg
+ * (sg_last(sg) == true) was reached.
   */
  struct sg_page_iter {
      struct scatterlist    *sg;        /* sg holding the page */