* [PATCH] arm64: Change misleading function names in dma-mapping
[not found] <CAD15agZzJ4=RMbky+GymJbyktLz0PO+uZ-GOh1SbvH476k4hzA@mail.gmail.com>
@ 2014-02-06 10:09 ` Will Deacon
2014-02-06 10:29 ` Catalin Marinas
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2014-02-06 10:09 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 06, 2014 at 06:28:22AM +0000, Ritesh Harjani wrote:
>
> From: Ritesh Harjani <ritesh.harjani at gmail.com<mailto:ritesh.harjani@gmail.com>>
>
> arm64_swiotlb_alloc/free_coherent name can be misleading
> somtimes with CMA support being enabled after this
> patch (c2104debc235b745265b64d610237a6833fd53)
>
> Change this name to be more generic:
> arm64_dma_alloc/free_coherent
I'm fine with this cosmetic change, but the (pre-existing) arm64 prefix looks
a little odd for a static function.
Will
> Signed-off-by: Ritesh Harjani <ritesh.harjani at gmail.com<mailto:ritesh.harjani@gmail.com>>
> ---
> arch/arm64/mm/dma-mapping.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
> index 45b5ab5..7517796 100644
> --- a/arch/arm64/mm/dma-mapping.c
> +++ b/arch/arm64/mm/dma-mapping.c
> @@ -30,7 +30,7 @@
> struct dma_map_ops *dma_ops;
> EXPORT_SYMBOL(dma_ops);
>
> -static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size,
> +static void *arm64_dma_alloc_coherent(struct device *dev, size_t size,
> dma_addr_t *dma_handle, gfp_t flags,
> struct dma_attrs *attrs)
> {
> @@ -57,7 +57,7 @@ static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size,
> }
> }
>
> -static void arm64_swiotlb_free_coherent(struct device *dev, size_t size,
> +static void arm64_dma_free_coherent(struct device *dev, size_t size,
> void *vaddr, dma_addr_t dma_handle,
> struct dma_attrs *attrs)
> {
> @@ -78,8 +78,8 @@ static void arm64_swiotlb_free_coherent(struct device *dev, size_t size,
> }
>
> static struct dma_map_ops arm64_swiotlb_dma_ops = {
> - .alloc = arm64_swiotlb_alloc_coherent,
> - .free = arm64_swiotlb_free_coherent,
> + .alloc = arm64_dma_alloc_coherent,
> + .free = arm64_dma_free_coherent,
> .map_page = swiotlb_map_page,
> .unmap_page = swiotlb_unmap_page,
> .map_sg = swiotlb_map_sg_attrs,
> --
> 1.8.1.3
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm64: Change misleading function names in dma-mapping
2014-02-06 10:09 ` [PATCH] arm64: Change misleading function names in dma-mapping Will Deacon
@ 2014-02-06 10:29 ` Catalin Marinas
0 siblings, 0 replies; 4+ messages in thread
From: Catalin Marinas @ 2014-02-06 10:29 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 06, 2014 at 10:09:09AM +0000, Will Deacon wrote:
> On Thu, Feb 06, 2014 at 06:28:22AM +0000, Ritesh Harjani wrote:
> >
> > From: Ritesh Harjani <ritesh.harjani at gmail.com<mailto:ritesh.harjani@gmail.com>>
> >
> > arm64_swiotlb_alloc/free_coherent name can be misleading
> > somtimes with CMA support being enabled after this
> > patch (c2104debc235b745265b64d610237a6833fd53)
> >
> > Change this name to be more generic:
> > arm64_dma_alloc/free_coherent
>
> I'm fine with this cosmetic change, but the (pre-existing) arm64 prefix looks
> a little odd for a static function.
Good point. I'm happy with a simpler __dma_alloc_coherent().
--
Catalin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm64: Change misleading function names in dma-mapping
@ 2014-02-06 11:51 Ritesh Harjani
0 siblings, 0 replies; 4+ messages in thread
From: Ritesh Harjani @ 2014-02-06 11:51 UTC (permalink / raw)
To: linux-arm-kernel
From: Ritesh Harjani <ritesh.harjani@gmail.com>
Included changes in the patch based on the suggestion.
Ritesh Harjani (1):
arm64: Change misleading function names in dma-mapping
arch/arm64/mm/dma-mapping.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
1.8.1.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm64: Change misleading function names in dma-mapping
@ 2014-02-06 11:51 Ritesh Harjani
0 siblings, 0 replies; 4+ messages in thread
From: Ritesh Harjani @ 2014-02-06 11:51 UTC (permalink / raw)
To: linux-arm-kernel
From: Ritesh Harjani <ritesh.harjani@gmail.com>
arm64_swiotlb_alloc/free_coherent name can be misleading
somtimes with CMA support being enabled after this
patch (c2104debc235b745265b64d610237a6833fd53)
Change this name to be more generic:
__dma_alloc/free_coherent
Signed-off-by: Ritesh Harjani <ritesh.harjani@gmail.com>
---
arch/arm64/mm/dma-mapping.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index 45b5ab5..aee7521 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -30,7 +30,7 @@
struct dma_map_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
-static void *arm64_swiotlb_alloc_coherent(struct device *dev, size_t size,
+static void *__dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t flags,
struct dma_attrs *attrs)
{
@@ -57,7 +57,7 @@ static void *arm64_swiotlb_alloc_coherent(struct
device *dev, size_t size,
}
}
-static void arm64_swiotlb_free_coherent(struct device *dev, size_t size,
+static void __dma_free_coherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle,
struct dma_attrs *attrs)
{
@@ -78,8 +78,8 @@ static void arm64_swiotlb_free_coherent(struct
device *dev, size_t size,
}
static struct dma_map_ops arm64_swiotlb_dma_ops = {
- .alloc = arm64_swiotlb_alloc_coherent,
- .free = arm64_swiotlb_free_coherent,
+ .alloc = __dma_alloc_coherent,
+ .free = __dma_free_coherent,
.map_page = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
.map_sg = swiotlb_map_sg_attrs,
--
1.8.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-06 11:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAD15agZzJ4=RMbky+GymJbyktLz0PO+uZ-GOh1SbvH476k4hzA@mail.gmail.com>
2014-02-06 10:09 ` [PATCH] arm64: Change misleading function names in dma-mapping Will Deacon
2014-02-06 10:29 ` Catalin Marinas
2014-02-06 11:51 Ritesh Harjani
-- strict thread matches above, loose matches on Subject: below --
2014-02-06 11:51 Ritesh Harjani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).