From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSxt-0006br-Lt for qemu-devel@nongnu.org; Wed, 20 Jun 2012 18:01:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShSxr-0006ad-E7 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 18:01:29 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:46294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSxr-0006aV-7B for qemu-devel@nongnu.org; Wed, 20 Jun 2012 18:01:27 -0400 Received: by dadn2 with SMTP id n2so9978248dad.4 for ; Wed, 20 Jun 2012 15:01:25 -0700 (PDT) Message-ID: <4FE24830.8000508@codemonkey.ws> Date: Wed, 20 Jun 2012 17:01:20 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1340087992-2399-1-git-send-email-benh@kernel.crashing.org> <1340087992-2399-4-git-send-email-benh@kernel.crashing.org> <4FE23DBF.9040706@codemonkey.ws> <20120620214003.GC25850@redhat.com> In-Reply-To: <20120620214003.GC25850@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Richard Henderson , Eduard - Gabriel Munteanu , qemu-devel@nongnu.org, David Gibson On 06/20/2012 04:40 PM, Michael S. Tsirkin wrote: > On Wed, Jun 20, 2012 at 04:16:47PM -0500, Anthony Liguori wrote: >>> diff --git a/qemu-common.h b/qemu-common.h >>> index 8f87e41..80026af 100644 >>> --- a/qemu-common.h >>> +++ b/qemu-common.h >>> @@ -264,6 +264,7 @@ typedef struct EventNotifier EventNotifier; >>> typedef struct VirtIODevice VirtIODevice; >>> typedef struct QEMUSGList QEMUSGList; >>> typedef struct SHPCDevice SHPCDevice; >>> +typedef struct DMAContext DMAContext; >> >> Please don't put this in qemu-common.h. Stick it in a dma-specific header. > > Weird. > > The point of typedefs in qemu-common.h is so people can > use type pointer *without pulling in the relevant header*. You're providing a back explanation to something that was completely unrelated... qemu-common.h was created because everything (literally everything) was in a single vl.h. So qemu-common.h was simply the left over crap from vl.h that didn't have a home elsewhere. It was never intended that we'd keep adding more stuff to qemu-common.h. Regards, Anthony Liguori > If we put a typedef in specific header it defeats the purpose. > > It used to even say this somewhere so I don't remember where. >