All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Matthew Wilcox <matthew@wil.cx>,
	linux-kernel@vger.kernel.org,
	SCSI development list <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@SteelEye.com>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: 2.6.22-rc3-mm1
Date: Thu, 31 May 2007 15:10:05 -0700	[thread overview]
Message-ID: <20070531151005.5c5db8af.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070531151338.GA759@infradead.org>

On Thu, 31 May 2007 16:13:38 +0100
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, May 31, 2007 at 08:35:13AM -0400, Jeff Garzik wrote:
> > Cornelia Huck wrote:
> > >On Thu, 31 May 2007 06:15:57 -0600,
> > >Matthew Wilcox <matthew@wil.cx> wrote:
> > >
> > >>On Thu, May 31, 2007 at 02:09:22PM +0200, Cornelia Huck wrote:
> > >>>I split those functions out into a new file. Builds on s390 and i386.
> > >>Why not just put #ifdef CONFIG_HAS_DMA / #endif around the pair of
> > >>functions?  I don't see the need to add a new Kconfig symbol and a new
> > >>file for this.
> > >
> > >I prefer a new file over #ifdefs in c files. (New dma-dependent stuff
> > >would also have a place where it could go to.)
> > >
> > >But I'll do whatever ends up as consensus :)
> > 
> > 50 lines isn't much need for a new file.
> 
> The scsi core shouldn't know anything about dma mappings, so a separate
> file is a good idea just to keep the separation clean.

ok, let's go this way.

Cornelia, afaict your patch has no actual delendency upon Dan's
dma-mapping-prevent-dma-dependent-code-from-linking-on.patch, correct?  If
so, I can merge it via James and then merge Dan's patch once James has
merged.

If there is a dependency then I guess I merge both into a single diff and
merge it all in one hit.

btw, this:

diff -puN include/scsi/scsi_cmnd.h~scsi-dont-build-scsi_dma_mapunmap-for-has_dma include/scsi/scsi_cmnd.h
--- a/include/scsi/scsi_cmnd.h~scsi-dont-build-scsi_dma_mapunmap-for-has_dma
+++ a/include/scsi/scsi_cmnd.h
@@ -135,8 +135,10 @@ extern void scsi_kunmap_atomic_sg(void *
 extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t);
 extern void scsi_free_sgtable(struct scatterlist *, int);
 
+#ifdef CONFIG_SCSI_DMA
 extern int scsi_dma_map(struct scsi_cmnd *cmd);
 extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
+#endif
 
 #define scsi_sg_count(cmd) ((cmd)->use_sg)
 #define scsi_sglist(cmd) ((struct scatterlist *)(cmd)->request_buffer)

We don't really need the ifdefs here.  If someone incorrectly calls these
functions then they'll get a link-time failure anyway.  The downside of
removing these ifdefs is that they won't get a compile-time warning, but I
tend to think that this small cost is worth it.

  reply	other threads:[~2007-05-31 22:10 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31  6:58 2.6.22-rc3-mm1 Andrew Morton
2007-05-31 12:09 ` 2.6.22-rc3-mm1 Cornelia Huck
2007-05-31 12:15   ` 2.6.22-rc3-mm1 Matthew Wilcox
2007-05-31 12:20     ` 2.6.22-rc3-mm1 Cornelia Huck
2007-05-31 12:35       ` 2.6.22-rc3-mm1 Jeff Garzik
2007-05-31 15:11         ` 2.6.22-rc3-mm1 Cornelia Huck
2007-05-31 15:13         ` 2.6.22-rc3-mm1 Christoph Hellwig
2007-05-31 22:10           ` Andrew Morton [this message]
2007-06-01  7:09             ` 2.6.22-rc3-mm1 Cornelia Huck
2007-05-31 15:29 ` 2.6.22-rc3-mm1 Michal Piotrowski
2007-05-31 19:58   ` 2.6.22-rc3-mm1 Rafael J. Wysocki
2007-05-31 21:25     ` 2.6.22-rc3-mm1 Michal Piotrowski
2007-05-31 21:34       ` 2.6.22-rc3-mm1 Rafael J. Wysocki
2007-05-31 21:34       ` 2.6.22-rc3-mm1 Rafael J. Wysocki
2007-05-31 21:30     ` [PATCH -mm] Freezer: migration_thread should not be freezable (was: Re: [linux-pm] Re: 2.6.22-rc3-mm1) Rafael J. Wysocki
2007-05-31 21:45       ` [PATCH -mm] Freezer: migration_thread should not be freezable (was: " Michal Piotrowski
2007-05-31 21:30     ` Rafael J. Wysocki
2007-05-31 19:58   ` 2.6.22-rc3-mm1 Rafael J. Wysocki
2007-05-31 15:29 ` 2.6.22-rc3-mm1 Michal Piotrowski
2007-05-31 17:53 ` 2.6.22-rc3-mm1 Michal Piotrowski
2007-05-31 18:08   ` 2.6.22-rc3-mm1 Michal Piotrowski
2007-05-31 18:31   ` 2.6.22-rc3-mm1 Andrew Morton
2007-05-31 18:41     ` 2.6.22-rc3-mm1 Christoph Lameter
2007-05-31 18:53       ` 2.6.22-rc3-mm1 Andrew Morton
2007-05-31 18:57         ` 2.6.22-rc3-mm1 Christoph Lameter
2007-05-31 20:43 ` 2.6.22-rc3-mm1 Mariusz Kozlowski
2007-05-31 21:19   ` 2.6.22-rc3-mm1 Andrew Morton
2007-05-31 21:19     ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-01 20:50     ` 2.6.22-rc3-mm1 Mariusz Kozlowski
2007-06-01 20:50       ` 2.6.22-rc3-mm1 Mariusz Kozlowski
2007-06-01 21:02       ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-01 21:02         ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-01 21:21         ` 2.6.22-rc3-mm1 Mariusz Kozlowski
2007-06-01 21:21           ` 2.6.22-rc3-mm1 Mariusz Kozlowski
2007-06-04  2:29           ` 2.6.22-rc3-mm1 Michael Ellerman
2007-06-04  8:35             ` 2.6.22-rc3-mm1 Segher Boessenkool
2007-06-01 23:30         ` 2.6.22-rc3-mm1 Benjamin Herrenschmidt
2007-06-01 23:30           ` 2.6.22-rc3-mm1 Benjamin Herrenschmidt
2007-06-02  8:40         ` 2.6.22-rc3-mm1 Segher Boessenkool
2007-06-02  8:40           ` 2.6.22-rc3-mm1 Segher Boessenkool
2007-05-31 22:05 ` 2.6.22-rc3-mm1 - works-for-me and a meta-question Valdis.Kletnieks
2007-05-31 22:16   ` Andrew Morton
     [not found]   ` <6bffcb0e0705311527ge774f48s8014f5108556f651@mail.gmail.com>
2007-05-31 23:21     ` andrea
2007-05-31 23:13 ` 2.6.22-rc3-mm1 - page_mkwrite() breakage Mark Fasheh
2007-06-01  1:01   ` Nick Piggin
2007-06-01  1:24     ` Mark Fasheh
2007-06-01  1:34       ` Nick Piggin
2007-06-01  1:45         ` Mark Fasheh
2007-06-01  1:53           ` Nick Piggin
2007-06-01  5:20             ` Mark Fasheh
2007-06-01 22:01               ` Mark Fasheh
2007-06-01 22:25                 ` Andrew Morton
2007-06-01 22:33                   ` Mark Fasheh
2007-06-01 22:47                     ` Andrew Morton
2007-06-01 22:53                       ` Mark Fasheh
2007-06-01  2:01 ` 2.6.22-rc3-mm1 Arnaldo Carvalho de Melo
2007-06-01  2:12   ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-01  2:24     ` 2.6.22-rc3-mm1 Arnaldo Carvalho de Melo
2007-06-01  3:52 ` 2.6.22-rc3-mm1 Michael Ellerman
2007-06-01  5:55   ` 2.6.22-rc3-mm1 Eric W. Biederman
2007-06-01 16:42 ` 2.6.22-rc3-mm1: IA64 make allnoconfig broken Mel Gorman
2007-06-01 17:00   ` Andrew Morton
2007-06-01 18:50     ` Mel Gorman
2007-06-01 20:55       ` [PATCH] Fix problem with IA64 make allnoconfig Mel Gorman
2007-06-02 13:57 ` 2.6.22-rc3-mm1: Xen compile error with X86_CMPXCHG=n Adrian Bunk
2007-06-28 23:36   ` Adrian Bunk
2007-06-29  3:21     ` Jeremy Fitzhardinge
2007-06-02 17:06 ` [-mm patch] fix XEN_BLKDEV_FRONTEND Makefile entry Adrian Bunk
2007-06-02 17:14 ` 2.6.22-rc3-mm1: __attribute__((weak)) considered harmful Adrian Bunk
2007-06-04 21:22   ` Andrew Morton
2007-06-04 23:52     ` Martin Peschke
2007-06-05  3:59       ` Russell King
2007-06-02 19:09 ` [-mm patch] the ASYNC_* options shouldn't be user visible Adrian Bunk
2007-06-04 16:19   ` Williams, Dan J
2007-06-03 20:54 ` [-mm patch] make drivers/firmware/dmi-id.c:dmi_id_init() static Adrian Bunk
2007-06-08  4:38   ` Greg KH
2007-06-03 20:54 ` [-mm patch] drivers/i2c/chips/ds1682.c: make code static Adrian Bunk
2007-06-04  8:15   ` Jean Delvare
2007-06-03 20:54 ` [-mm patch] make xpad_play_effect() static Adrian Bunk
2007-06-03 20:54 ` [-mm patch] fix the tea5761 tuner support Adrian Bunk
2007-06-04 18:00 ` 2.6.22-rc3-mm1 - pppd hanging in netdev_run_todo while holding mutex Valdis.Kletnieks
2007-06-06  6:14   ` Andrew Morton
2007-06-04 22:12 ` [-mm patch] e1000: #if 0 two functions Adrian Bunk
2007-06-04 22:13 ` [-mm patch] drivers/mmc/core/core.{h,c}: cleanups Adrian Bunk
2007-06-06 18:36   ` Pierre Ossman
2007-06-05  9:11 ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:18   ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:24   ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-05  9:33     ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:39       ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:42         ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:45           ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:50             ` 2.6.22-rc3-mm1 Ingo Molnar
2007-06-05  9:56               ` 2.6.22-rc3 nmi watchdog hang Ingo Molnar
2007-06-10 18:10                 ` Björn Steinbrink
2007-06-18 12:11                   ` Ingo Molnar
2007-06-18 14:31                     ` Björn Steinbrink
2007-06-25  6:18                     ` Ingo Molnar
2007-06-25  6:59                       ` Ingo Molnar
2007-06-25  8:05                         ` [patch, 2.6.22-rc6] fix nmi_watchdog=2 bootup hang Ingo Molnar
2007-06-25  8:26                           ` Ingo Molnar
2007-06-25 12:45                             ` Björn Steinbrink
2007-06-25 12:49                               ` Jeremy Fitzhardinge
2007-06-25 13:06                                 ` Björn Steinbrink
2007-06-25 18:50                               ` [patch, 2.6.22-rc6] fix nmi_watchdog=2 bootup hang, take #2 Ingo Molnar
2007-06-25 12:40                           ` [patch, 2.6.22-rc6] fix nmi_watchdog=2 bootup hang Jeremy Fitzhardinge
2007-06-25 13:13                             ` Björn Steinbrink
2007-06-05 15:16 ` 2.6.22-rc3-mm1 Rusty Russell
2007-06-05 21:50 ` [-mm patch] kernel/power/disk.c: make code static Adrian Bunk
2007-06-05 21:50   ` Adrian Bunk
2007-06-05 22:10   ` Rafael J. Wysocki
2007-06-05 22:10     ` Rafael J. Wysocki
2007-06-05 21:50 ` [-mm patch] kernel/sched{,_fair}.c: " Adrian Bunk
2007-06-06  6:54   ` Andrew Morton
2007-06-06  7:30     ` Ingo Molnar
2007-06-06 12:31       ` Adrian Bunk
2007-06-06  7:02   ` Ingo Molnar
2007-06-05 21:51 ` [-mm patch] kernel/lockdep_proc.c: make 2 functions static Adrian Bunk
2007-06-05 22:34   ` Peter Zijlstra
2007-06-05 21:51 ` [-mm patch] fs/proc/base.c: make a struct static Adrian Bunk
2007-06-06  7:32   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2007-05-31  6:58 2.6.22-rc3-mm1 Andrew Morton
2007-06-05 12:05 2.6.22-rc3-mm1 Zoltan Boszormenyi
2007-06-05 16:17 ` 2.6.22-rc3-mm1 Andrew Morton
2007-06-05 16:20   ` 2.6.22-rc3-mm1 Jeff Garzik

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=20070531151005.5c5db8af.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@infradead.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.