From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOUVX-0005FC-Dg for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:31:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOUVR-0002uW-F1 for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:31:07 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:45347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOUVR-0002uJ-8O for qemu-devel@nongnu.org; Mon, 01 Sep 2014 12:31:01 -0400 Received: by mail-la0-f43.google.com with SMTP id ty20so6403507lab.16 for ; Mon, 01 Sep 2014 09:31:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Peter Maydell Date: Mon, 1 Sep 2014 17:30:40 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v1 1/5] Netduino_USART: Add the Netduino Plus 2 USART Controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Alistair Francis , "qemu-devel@nongnu.org Developers" , Konstanty Bialkowski On 24 August 2014 03:09, Peter Crosthwaite wrote: > If you make your registers an array, you can index the with the offset > and remove the repeated s->foo return logic. You can also use a single > memset to do all the 0 resets. Hmm. I dislike that style personally, especially for devices like this which only have a handful of registers. -- PMM