From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3w8b-0000gi-Vv for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:32:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3w8Z-0007OO-Uq for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:32:53 -0400 Received: from mail-vw0-f51.google.com ([209.85.212.51]:42667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3w8Z-0007NV-SP for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:32:51 -0400 Received: by vws20 with SMTP id 20so3366517vws.10 for ; Wed, 14 Sep 2011 13:32:51 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E710F71.5000506@twiddle.net> Date: Wed, 14 Sep 2011 13:32:49 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1315832873-18976-1-git-send-email-avi@redhat.com> In-Reply-To: <1315832873-18976-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] mips_malta: move i8259 initialization after piix4 initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org On 09/12/2011 06:07 AM, Avi Kivity wrote: > +static void malta_isa_irq_handler(void *opaque, int n, int level) > +{ > + MaltaISAState *s = opaque; > + > + if (s->i8259) { > + qemu_set_irq(s->i8259[n], level); > + } > +} Is there any point in the IF? I realize that there's an ordering problem that requires the use of the memory indirection in order to be able to provide *some* opaque value at the proper time, but AFAICT the ->i8259 value will *always* be non-null at the point this function is called. Am I wrong here? Otherwise the approach looks correct. r~