mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	"discuss@x86-64.org" <discuss@x86-64.org>
Subject: [PATCH x86-64]: remove superflous BUG_ON's in nommu and gart
Date: Tue, 1 Aug 2006 15:59:32 +0300	[thread overview]
Message-ID: <20060801125932.GF3436@rhun.haifa.ibm.com> (raw)

There's no need to check for invalid DMA data direction in nommu and
gart since we do it in dma-mapping.h anyway before calling the
individual dma-ops.

Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>

diff -r b90678f884c4 arch/x86_64/kernel/pci-gart.c
--- a/arch/x86_64/kernel/pci-gart.c	Mon Jul 31 21:01:32 2006 +0000
+++ b/arch/x86_64/kernel/pci-gart.c	Tue Aug 01 15:52:52 2006 +0300
@@ -239,8 +239,6 @@ dma_addr_t gart_map_single(struct device
 {
 	unsigned long phys_mem, bus;
 
-	BUG_ON(dir == DMA_NONE);
-
 	if (!dev)
 		dev = &fallback_dev;
 
@@ -383,7 +381,6 @@ int gart_map_sg(struct device *dev, stru
 	unsigned long pages = 0;
 	int need = 0, nextneed;
 
-	BUG_ON(dir == DMA_NONE);
 	if (nents == 0) 
 		return 0;
 
diff -r b90678f884c4 arch/x86_64/kernel/pci-nommu.c
--- a/arch/x86_64/kernel/pci-nommu.c	Mon Jul 31 21:01:32 2006 +0000
+++ b/arch/x86_64/kernel/pci-nommu.c	Tue Aug 01 15:52:58 2006 +0300
@@ -59,7 +59,6 @@ int nommu_map_sg(struct device *hwdev, s
 {
 	int i;
 
-	BUG_ON(direction == DMA_NONE);
  	for (i = 0; i < nents; i++ ) {
 		struct scatterlist *s = &sg[i];
 		BUG_ON(!s->page);



             reply	other threads:[~2006-08-01 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01 12:59 Muli Ben-Yehuda [this message]
2006-08-01 17:06 ` Andi Kleen

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=20060801125932.GF3436@rhun.haifa.ibm.com \
    --to=muli@il.ibm.com \
    --cc=ak@suse.de \
    --cc=discuss@x86-64.org \
    --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

all inboxes | Powered by JetHome®