From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhKKu-0004wD-8L for qemu-devel@nongnu.org; Wed, 11 Mar 2009 05:02:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhKKs-0004w1-Ci for qemu-devel@nongnu.org; Wed, 11 Mar 2009 05:02:47 -0400 Received: from [199.232.76.173] (port=60640 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhKKs-0004vy-3f for qemu-devel@nongnu.org; Wed, 11 Mar 2009 05:02:46 -0400 Received: from gecko.sbs.de ([194.138.37.40]:23632) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LhKKp-0005ib-L2 for qemu-devel@nongnu.org; Wed, 11 Mar 2009 05:02:45 -0400 Message-ID: <49B77E19.3010609@siemens.com> Date: Wed, 11 Mar 2009 10:02:17 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <20090221190054.12485.30486.stgit@mchn012c.ww002.siemens.net> <20090221190055.12485.61603.stgit@mchn012c.ww002.siemens.net> <49B3DC8C.6050700@web.de> <20090308184444.GT32521@hall.aurel32.net> <49B422DD.3080300@web.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] clean build: Add bt-host.h Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno andrzej zaborowski wrote: > 2009/3/8 Jan Kiszka : >> Aurelien Jarno wrote: >>> On Sun, Mar 08, 2009 at 03:56:12PM +0100, Jan Kiszka wrote: >>>> Jan Kiszka wrote: >>>>> Silence compiler warning by providing a prototype in the CONFIG_BLUEZ >>>>> case (hw/bt.h provides it otherwise). >>>>> >>>>> Signed-off-by: Jan Kiszka >>>>> --- >>>>> >>>>> bt-host.c | 2 ++ >>>>> 1 files changed, 2 insertions(+), 0 deletions(-) >>>>> >>>>> diff --git a/bt-host.c b/bt-host.c >>>>> index 07679f6..066757a 100644 >>>>> --- a/bt-host.c >>>>> +++ b/bt-host.c >>>>> @@ -31,6 +31,8 @@ >>>>> # include >>>>> # include >>>>> # include >>>>> +/* Silence compiler warning */ >>>>> +struct HCIInfo *bt_host_hci(const char *id); >>>>> # else >>>>> # include "hw/bt.h" >>>>> # define HCI_MAX_FRAME_SIZE 1028 >>>> Thanks for applying the other patches, but this tiny one always seems to >>>> be ignored - for unknown reasons. :) >>>> >>> On my side, I consider that a hack, not a fix. We should make sure the >>> correct header is included so that this function is declared. >>> >> As always: no comment means no progress. This one better? > > Is it? > struct HCIInfo is defined in net.h so maybe this one belongs there too. > > I'd much rather turn off the unhelpful warnings, some of them caused > developers to add code that is both more hacky and slower. I also > think we could save many header files like the hw/virtio-*.h, at this > granularity they don't help with compile times which was the reason > vl.h was split. I think we see so far a net gain from the warnings as several real bugs were caught that way. And in this case the warning pointed out unclean header organization (internal API exports mixed up with generic bluetooth types). The goal should not be "as few headers as possible" but "one header per reasonably partitioned API". IMHO, virtio is cleanly organized (and is surely no relevant contributor to compile times). Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux