From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBq5t-0003oP-6f for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:33:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBq5s-0004pb-CD for qemu-devel@nongnu.org; Wed, 23 Dec 2015 15:33:09 -0500 Sender: Paolo Bonzini References: <1449187263-4604-1-git-send-email-Andrew.Baumann@microsoft.com> <1449208887-9564-1-git-send-email-Andrew.Baumann@microsoft.com> From: Paolo Bonzini Message-ID: <567B04FA.2030903@redhat.com> Date: Wed, 23 Dec 2015 21:32:58 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/8] bcm2835_sbm: add BCM2835 mailboxes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , Andrew Baumann Cc: Peter Maydell , Peter Crosthwaite , Stefan Weil , =?UTF-8?Q?Gr=c3=a9gory_ESTRADE?= , "qemu-devel@nongnu.org Developers" , qemu-arm On 22/12/2015 00:33, Peter Crosthwaite wrote: >>> >> >>> >> case 0x80..0x8c >> > >> > Woah! Is that standard C? >> > > Yes, its probably one of the more recent language standards though. > QEMU does use to more modern features liberally. It's actually "case 0x80 ... 0x8c:". >> Notice that this file comes from Linux. I know it's not pretty, but >> can we please keep it as-is, for comparison purposes? I'm not sure >> there's much value in cleaning it up locally... > > It looks very autogenerated and seems pretty nasty on the repetition. > > As implementers of the hardware, it is much rarer to need these > repetitious defs than the software users on the other side. "Do > something specific with CPU#3's Mbox#5" is going to appear in > software, but hardware implementers generally don't have a choice to > implement things specifically and it usually ends up being looped and > the exploded defs are never used. If there are only a handful of > genuinely single defs needed, can they be fished out? I see your point and I'm definitely in favor of rewriting headers from scratch when practical, but any cleanup made is a recipe for unwanted changes and bugs, especially if the source is full of repetitions. Paolo