From patchwork Wed Jun 3 13:08:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 49466 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A79D20BE7 for ; Wed, 3 Jun 2015 13:47:34 +0000 (UTC) Received: by wgme6 with SMTP id e6sf2805397wgm.3 for ; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=W+2oBh2vvfhaCndUAJJwI8zbYT8B4L2JWxhwkVm2i8Y=; b=DZBRam4pKug8uDMZRjTDNd3mtGTUVwgdojN5TD7OBf4r3etuQATdLTNKVoz/eiTo39 FFs+gLWPxhkQaCJJuE9EAI7LZ9p22LMGh42vmtDYC2a92IgVV7X/l0CBvWw4bbacvzI+ vt4OfZtznTM7G07wOwyBaL2drhHppDvFTklmgi1fmzjgdm6Z/tFqQlOnbawD57jV/ryf suMqnrg/aslUzCMLsyr220XNAZ33/fPVBFULLeQVRCkYKAghnT+Bk76osL81Ax5DJtGQ YySP9FPnfMjcAe68QjBhfEh1nga+u2zEozKjnhr8vGmY2OyPipSCJbNVNfh2vG5ir4HY 7xNQ== X-Gm-Message-State: ALoCoQl45fBoCuth/HlJNFJU621r4O4KyeuyLd9UDXCVh6jrT882hFtF04turZeP+B8uAkLI1dBp X-Received: by 10.112.53.102 with SMTP id a6mr30906918lbp.16.1433339253876; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.229 with SMTP id w5ls56574lag.44.gmail; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) X-Received: by 10.112.137.232 with SMTP id ql8mr7143280lbb.121.1433339253725; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id dc7si880748lad.124.2015.06.03.06.47.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 06:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by labpy14 with SMTP id py14so8586993lab.0 for ; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) X-Received: by 10.112.93.37 with SMTP id cr5mr10679211lbb.106.1433339253266; Wed, 03 Jun 2015 06:47:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3881608lbb; Wed, 3 Jun 2015 06:47:32 -0700 (PDT) X-Received: by 10.140.36.137 with SMTP id p9mr35124912qgp.16.1433339251732; Wed, 03 Jun 2015 06:47:31 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y89si621212qgd.104.2015.06.03.06.47.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Jun 2015 06:47:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:35654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0910-0006Gd-MC for patch@linaro.org; Wed, 03 Jun 2015 09:47:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z090B-000582-Mv for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0906-0000qp-Je for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:46:39 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:54666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0906-0000ph-At; Wed, 03 Jun 2015 09:46:34 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 26BD4407B2; Wed, 3 Jun 2015 16:46:33 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 7DEA5A62; Wed, 3 Jun 2015 16:08:54 +0300 (MSK) Received: (nullmailer pid 27453 invoked by uid 1000); Wed, 03 Jun 2015 13:08:52 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 3 Jun 2015 16:08:40 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Michael Tokarev , Shannon Zhao , Shannon Zhao Subject: [Qemu-devel] [PULL 20/30] hw/lm32/lm32_boards.c: Fix misusing qemu_allocate_irqs for single irq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mjt@tls.msk.ru X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Michael Tokarev --- hw/lm32/lm32_boards.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c index 14d0efc..70f48d3 100644 --- a/hw/lm32/lm32_boards.c +++ b/hw/lm32/lm32_boards.c @@ -78,7 +78,7 @@ static void lm32_evr_init(MachineState *machine) DriveInfo *dinfo; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *phys_ram = g_new(MemoryRegion, 1); - qemu_irq *cpu_irq, irq[32]; + qemu_irq irq[32]; ResetInfo *reset_info; int i; @@ -123,8 +123,7 @@ static void lm32_evr_init(MachineState *machine) 1, 2, 0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1); /* create irq lines */ - cpu_irq = qemu_allocate_irqs(cpu_irq_handler, cpu, 1); - env->pic_state = lm32_pic_init(*cpu_irq); + env->pic_state = lm32_pic_init(qemu_allocate_irq(cpu_irq_handler, cpu, 0)); for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(env->pic_state, i); } @@ -173,7 +172,7 @@ static void lm32_uclinux_init(MachineState *machine) DriveInfo *dinfo; MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *phys_ram = g_new(MemoryRegion, 1); - qemu_irq *cpu_irq, irq[32]; + qemu_irq irq[32]; HWSetup *hw; ResetInfo *reset_info; int i; @@ -225,8 +224,7 @@ static void lm32_uclinux_init(MachineState *machine) 1, 2, 0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1); /* create irq lines */ - cpu_irq = qemu_allocate_irqs(cpu_irq_handler, env, 1); - env->pic_state = lm32_pic_init(*cpu_irq); + env->pic_state = lm32_pic_init(qemu_allocate_irq(cpu_irq_handler, env, 0)); for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(env->pic_state, i); }