Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649974
| From | Logan Gunthorpe <logang@deltatee.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 02/16] staging: ccree: Cleanup: remove references to page_link |
| Date | 2017-05-24 23:50 +0200 |
| Message-ID | <tKMkj-7HS-37@gated-at.bofh.it> (permalink) |
| References | <tKMkh-7HS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is a layering violation so we replace it with calls to
sg_page. This is a prep patch for replacing page_link and this
is one of the very few uses outside of scatterlist.h.
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
---
drivers/staging/ccree/ssi_buffer_mgr.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index 038e2ff..07bbf8f 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -43,8 +43,8 @@
#ifdef CC_DEBUG
#define DUMP_SGL(sg) \
while (sg) { \
- SSI_LOG_DEBUG("page=%lu offset=%u length=%u (dma_len=%u) " \
- "dma_addr=%08x\n", (sg)->page_link, (sg)->offset, \
+ SSI_LOG_DEBUG("page=%p offset=%u length=%u (dma_len=%u) " \
+ "dma_addr=%08x\n", sg_page(sg), (sg)->offset, \
(sg)->length, sg_dma_len(sg), (sg)->dma_address); \
(sg) = sg_next(sg); \
}
@@ -442,10 +442,10 @@ static int ssi_buffer_mgr_map_scatterlist(
return -ENOMEM;
}
SSI_LOG_DEBUG("Mapped sg: dma_address=0x%llX "
- "page_link=0x%08lX addr=%pK offset=%u "
+ "page=%p addr=%pK offset=%u "
"length=%u\n",
(unsigned long long)sg_dma_address(sg),
- sg->page_link,
+ sg_page(sg),
sg_virt(sg),
sg->offset, sg->length);
*lbytes = nbytes;
@@ -505,10 +505,10 @@ ssi_aead_handle_config_buf(struct device *dev,
return -ENOMEM;
}
SSI_LOG_DEBUG("Mapped curr_buff: dma_address=0x%llX "
- "page_link=0x%08lX addr=%pK "
+ "page=%p addr=%pK "
"offset=%u length=%u\n",
(unsigned long long)sg_dma_address(&areq_ctx->ccm_adata_sg),
- areq_ctx->ccm_adata_sg.page_link,
+ sg_page(&areq_ctx->ccm_adata_sg),
sg_virt(&areq_ctx->ccm_adata_sg),
areq_ctx->ccm_adata_sg.offset,
areq_ctx->ccm_adata_sg.length);
@@ -540,10 +540,10 @@ static inline int ssi_ahash_handle_curr_buf(struct device *dev,
return -ENOMEM;
}
SSI_LOG_DEBUG("Mapped curr_buff: dma_address=0x%llX "
- "page_link=0x%08lX addr=%pK "
+ "page=%p addr=%pK "
"offset=%u length=%u\n",
(unsigned long long)sg_dma_address(areq_ctx->buff_sg),
- areq_ctx->buff_sg->page_link,
+ sg_page(areq_ctx->buff_sg),
sg_virt(areq_ctx->buff_sg),
areq_ctx->buff_sg->offset,
areq_ctx->buff_sg->length);
@@ -1870,4 +1870,3 @@ int ssi_buffer_mgr_fini(struct ssi_drvdata *drvdata)
}
return 0;
}
-
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 00/16] Unmappable memory in SGLs for p2p transfers Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 04/16] um: add dummy ioremap and iounmap functions Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 15/16] dma-mapping: introduce and use unmappable safe sg_virt call Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 02/16] staging: ccree: Cleanup: remove references to page_link Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 09/16] bvec: introduce bvec_page and bvec_set_page accessors Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 16/16] nvmet: use unmappable sgl in rdma target Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 11/16] bvec: convert to using pfn_t internally Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200 [RFC PATCH 03/16] kfifo: Cleanup example to not use page_link Logan Gunthorpe <logang@deltatee.com> - 2017-05-24 23:50 +0200
csiph-web