[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060802185527.GB4982@rhun.ibm.com>
Date: Wed, 2 Aug 2006 21:55:27 +0300
From: Muli Ben-Yehuda <muli@...ibm.com>
To: Rolf Eike Beer <eike-kernel@...tec.de>
Cc: Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...e.de>, discuss@...-64.org
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists