public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] remove deprecated dma_sync_single and dma_sync_sg API
@ 2010-05-11  1:13 FUJITA Tomonori
  2010-05-12 23:28 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: FUJITA Tomonori @ 2010-05-11  1:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Since 2.6.5, it had been commented, 'for backwards compatibility,
removed in 2.7.x'. Since 2.6.31, it have been marked as __deprecated.

I think that we can remove the API safely now.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 include/linux/dma-mapping.h |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 2ea1494..89b7e1a 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -95,21 +95,6 @@ static inline int is_device_dma_capable(struct device *dev)
 #include <asm-generic/dma-mapping-broken.h>
 #endif
 
-/* for backwards compatibility, removed soon */
-static inline void __deprecated dma_sync_single(struct device *dev,
-						dma_addr_t addr, size_t size,
-						enum dma_data_direction dir)
-{
-	dma_sync_single_for_cpu(dev, addr, size, dir);
-}
-
-static inline void __deprecated dma_sync_sg(struct device *dev,
-					    struct scatterlist *sg, int nelems,
-					    enum dma_data_direction dir)
-{
-	dma_sync_sg_for_cpu(dev, sg, nelems, dir);
-}
-
 static inline u64 dma_get_mask(struct device *dev)
 {
 	if (dev && dev->dma_mask && *dev->dma_mask)
-- 
1.6.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -mm] remove deprecated dma_sync_single and dma_sync_sg API
  2010-05-11  1:13 [PATCH -mm] remove deprecated dma_sync_single and dma_sync_sg API FUJITA Tomonori
@ 2010-05-12 23:28 ` Andrew Morton
  2010-05-13  3:27   ` FUJITA Tomonori
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2010-05-12 23:28 UTC (permalink / raw)
  To: FUJITA Tomonori
  Cc: linux-kernel, Pete Eberlein, Ross Cohen, Greg KH, linux-ia64

On Tue, 11 May 2010 10:13:23 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> Since 2.6.5, it had been commented, 'for backwards compatibility,
> removed in 2.7.x'. Since 2.6.31, it have been marked as __deprecated.
> 
> I think that we can remove the API safely now.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
>  include/linux/dma-mapping.h |   15 ---------------
>  1 files changed, 0 insertions(+), 15 deletions(-)
> 
> diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> index 2ea1494..89b7e1a 100644
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -95,21 +95,6 @@ static inline int is_device_dma_capable(struct device *dev)
>  #include <asm-generic/dma-mapping-broken.h>
>  #endif
>  
> -/* for backwards compatibility, removed soon */
> -static inline void __deprecated dma_sync_single(struct device *dev,
> -						dma_addr_t addr, size_t size,
> -						enum dma_data_direction dir)
> -{
> -	dma_sync_single_for_cpu(dev, addr, size, dir);
> -}
> -
> -static inline void __deprecated dma_sync_sg(struct device *dev,
> -					    struct scatterlist *sg, int nelems,
> -					    enum dma_data_direction dir)
> -{
> -	dma_sync_sg_for_cpu(dev, sg, nelems, dir);
> -}
> -
>  static inline u64 dma_get_mask(struct device *dev)
>  {
>  	if (dev && dev->dma_mask && *dev->dma_mask)

drivers/staging/go7007/saa7134-go7007.c uses dma_sync_single().

arch/ia64/kernel/machvec.c has functions machvec_dma_sync_single() and
machvec_dma_sync_sg() which might be dead code.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -mm] remove deprecated dma_sync_single and dma_sync_sg API
  2010-05-12 23:28 ` Andrew Morton
@ 2010-05-13  3:27   ` FUJITA Tomonori
  0 siblings, 0 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2010-05-13  3:27 UTC (permalink / raw)
  To: akpm; +Cc: fujita.tomonori, linux-kernel, pete, rcohen, greg, linux-ia64

On Wed, 12 May 2010 16:28:03 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:

> On Tue, 11 May 2010 10:13:23 +0900
> FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> 
> > Since 2.6.5, it had been commented, 'for backwards compatibility,
> > removed in 2.7.x'. Since 2.6.31, it have been marked as __deprecated.
> > 
> > I think that we can remove the API safely now.
> > 
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> >  include/linux/dma-mapping.h |   15 ---------------
> >  1 files changed, 0 insertions(+), 15 deletions(-)
> > 
> > diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> > index 2ea1494..89b7e1a 100644
> > --- a/include/linux/dma-mapping.h
> > +++ b/include/linux/dma-mapping.h
> > @@ -95,21 +95,6 @@ static inline int is_device_dma_capable(struct device *dev)
> >  #include <asm-generic/dma-mapping-broken.h>
> >  #endif
> >  
> > -/* for backwards compatibility, removed soon */
> > -static inline void __deprecated dma_sync_single(struct device *dev,
> > -						dma_addr_t addr, size_t size,
> > -						enum dma_data_direction dir)
> > -{
> > -	dma_sync_single_for_cpu(dev, addr, size, dir);
> > -}
> > -
> > -static inline void __deprecated dma_sync_sg(struct device *dev,
> > -					    struct scatterlist *sg, int nelems,
> > -					    enum dma_data_direction dir)
> > -{
> > -	dma_sync_sg_for_cpu(dev, sg, nelems, dir);
> > -}
> > -
> >  static inline u64 dma_get_mask(struct device *dev)
> >  {
> >  	if (dev && dev->dma_mask && *dev->dma_mask)
> 
> drivers/staging/go7007/saa7134-go7007.c uses dma_sync_single().

I know but drivers/staging/go7007/Makefile says:

# Uncomment when the saa7134 patches get into upstream
#ifneq ($(CONFIG_VIDEO_SAA7134),)
#obj-$(CONFIG_VIDEO_SAA7134) += saa7134-go7007.o
#EXTRA_CFLAGS += -Idrivers/media/video/saa7134 -DSAA7134_MPEG_GO7007=3
#endif

So this patch doesn't break it. But it might be better to replace the
api in it now. I'll send a patch soon.


> arch/ia64/kernel/machvec.c has functions machvec_dma_sync_single() and
> machvec_dma_sync_sg() which might be dead code.

No, they are used. The function name is deceptive though.

IA64 uses machvec_dma_sync_single() to implement
machvec_dma_sync_single_for_device() and
machvec_dma_sync_single_for_cpu()

IA64 also uses machvec_dma_sync_sg() to implement
machvec_dma_sync_sg_for_device() and machvec_dma_sync_sg_for_cpu().

IA64's dma_sync_ API works in the same way in both DMA directions.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-13  3:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  1:13 [PATCH -mm] remove deprecated dma_sync_single and dma_sync_sg API FUJITA Tomonori
2010-05-12 23:28 ` Andrew Morton
2010-05-13  3:27   ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox