From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Sja-0005Gf-2C for qemu-devel@nongnu.org; Mon, 15 Dec 2014 05:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0SjQ-0007xz-OC for qemu-devel@nongnu.org; Mon, 15 Dec 2014 05:18:34 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:45651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0SjQ-0007ve-Fd for qemu-devel@nongnu.org; Mon, 15 Dec 2014 05:18:24 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Dec 2014 10:18:04 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id DA6372190043 for ; Mon, 15 Dec 2014 10:17:31 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBFAI17t60358904 for ; Mon, 15 Dec 2014 10:18:01 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBF5Egk2008507 for ; Mon, 15 Dec 2014 00:14:42 -0500 Date: Mon, 15 Dec 2014 11:17:58 +0100 From: Greg Kurz Message-ID: <20141215111758.7e71221c@bahia.local> In-Reply-To: <20141212182016.GO5002@thinpad.lan.raisama.net> References: <1418239610-3997-1-git-send-email-ehabkost@redhat.com> <1418239610-3997-2-git-send-email-ehabkost@redhat.com> <20141212182016.GO5002@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/7] Move target_words_bigendian() prototype to exec-all.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Peter Maydell , Igor Mammedov , "Michael S. Tsirkin" , QEMU Developers , Paolo Bonzini On Fri, 12 Dec 2014 16:20:16 -0200 Eduardo Habkost wrote: > On Wed, Dec 10, 2014 at 07:44:04PM +0000, Peter Maydell wrote: > > On 10 December 2014 at 19:26, Eduardo Habkost wrote: > > > Signed-off-by: Eduardo Habkost > > > --- > > > exec.c | 1 - > > > hw/virtio/virtio.c | 1 - > > > include/exec/exec-all.h | 2 ++ > > > 3 files changed, 2 insertions(+), 2 deletions(-) > > > > I thought this prototype was not in a generally > > included header file because it's really not something that > > should be needed by most code. If we do want to move it into > > a header then we definitely don't want it in exec-all.h. > > I have no idea what would be the best place for the prototype, then. > CCing the people who introduced the function, in case they have any > suggestion. > > Anyway, I don't want to make this series depend on dealing with the > virtio default-endianness mess, so in the next version I will drop this > patch and simply put the prototype inside tests/x86-stub.c. > Indeed, this function is part of the legacy virtio endianness mess. And Peter's remark is true: the prototype was deliberately kept hidden since no code should need it except virtio. There are two users and this isn't likely to change (except when everyone will have switched to virtio-1 and we drop all the legacy virtio hacks): - virtio_default_endian() in hw/virtio/virtio.c - cpu_common_virtio_is_big_endian() in qom/cpu.c I don't think it is worth moving the prototype to a common header file. Perhaps a comment saying "this is a legacy virtio hack that should stay hidden" would be more appropriate. -- Greg