From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9We-0002Kk-3l for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:22:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag9WY-0005Ud-Qf for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:22:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9WY-0005U6-MN for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:21:58 -0400 References: <1458125219-131698-1-git-send-email-pbonzini@redhat.com> <1458125219-131698-49-git-send-email-pbonzini@redhat.com> From: Paolo Bonzini Message-ID: <56E941D0.2060501@redhat.com> Date: Wed, 16 Mar 2016 12:21:52 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 48/49] hw: remove pio_addr_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 16/03/2016 12:16, Peter Maydell wrote: >> > Using uint32_t is enough and avoids the need to include ioport.h everywhere. >> > >> > Signed-off-by: Paolo Bonzini > I'm not hugely convinced by this patch -- I think it's nice > to have a typedef that indicates that you're dealing with an > IO port address (and not some other kind of address or number). In theory I agree, but in practice it's just a burden. It's almost unused---on one hand that's also because these days I/O ports are simply accessed through the address space, on the other hand even portio_* functions use it. cpu_{in,out}[bwl] are almost unused; monitor.c and xen-hvm.c could use address_space_read/write directly, since they have an integer size at hand. This leaves qtest as the only user of those functions, so we might as well inline them there. The only interesting use of pio_addr_t thus is include/hw/sysbus.h. I guess I could move it there, but I don't see much benefit in that either. Paolo