mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>,
	discuss@x86-64.org
Subject: Re: [PATCH] Move valid_dma_direction() from x86_64 to generic code
Date: Wed, 2 Aug 2006 21:55:27 +0300	[thread overview]
Message-ID: <20060802185527.GB4982@rhun.ibm.com> (raw)
In-Reply-To: <200608021720.40815.eike-kernel@sf-tec.de>

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

  reply	other threads:[~2006-08-02 18:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28  7:28 [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-07-28  7:47 ` Andrew Morton
2006-08-05 11:37   ` Pavel Machek
2006-08-07  1:20     ` Adrian Bunk
2006-07-28 17:44 ` Muli Ben-Yehuda
2006-08-02 15:20   ` [PATCH] Move valid_dma_direction() from x86_64 to generic code Rolf Eike Beer
2006-08-02 18:55     ` Muli Ben-Yehuda [this message]
2006-08-03  6:25       ` Rolf Eike Beer
2006-08-03  7:23         ` Muli Ben-Yehuda
2006-08-03 21:10           ` IOMMU (Calgary) patches Duran, Leo
2006-08-03 21:25             ` Jon Mason
2006-08-03 21:35               ` Duran, Leo
2006-08-03 22:46             ` [discuss] " Andi Kleen
2006-08-02 15:22   ` [PATCH] Use valid_dma_direction() in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-08-02 18:56     ` Muli Ben-Yehuda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060802185527.GB4982@rhun.ibm.com \
    --to=muli@il.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome