lkml.org 
[lkml]   [2006]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Move valid_dma_direction() from x86_64 to generic code
On Wed, Aug 02, 2006 at 05:20:40PM +0200, Rolf Eike Beer wrote:

> As suggested by Muli Ben-Yehuda this function is moved to generic code as
> may be useful for all archs.

I like it, but ...

> diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h
> index b6da83d..10174b1 100644
> --- a/include/asm-x86_64/dma-mapping.h
> +++ b/include/asm-x86_64/dma-mapping.h
> @@ -55,13 +55,6 @@ extern dma_addr_t bad_dma_address;
> extern struct dma_mapping_ops* dma_ops;
> extern int iommu_merge;
>
> -static inline int valid_dma_direction(int dma_direction)
> -{
> - return ((dma_direction == DMA_BIDIRECTIONAL) ||
> - (dma_direction == DMA_TO_DEVICE) ||
> - (dma_direction == DMA_FROM_DEVICE));
> -}
> -

Several files include asm/dma-mapping.h directly, which will now cause
them to fail to compile on x86-64 due to the missing definition for
valid_dma_direction, unless by chance another header already brought
it in indirectly. I guess the right thing to do is convert them all to
using linux/dma-mapping.h instead.

./arch/x86_64/kernel/pci-swiotlb.c:6:#include <asm/dma-mapping.h>
./drivers/net/fec_8xx/fec_main.c:40:#include <asm/dma-mapping.h>
./drivers/net/fs_enet/fs_enet.h:11:#include <asm/dma-mapping.h>
./include/asm-x86_64/swiotlb.h:5:#include <asm/dma-mapping.h>
./include/linux/dma-mapping.h:27:#include <asm/dma-mapping.h>

Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-02 20:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site