From patchwork Wed Jun 3 13:08:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 49458 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9BF4A20BE7 for ; Wed, 3 Jun 2015 13:17:36 +0000 (UTC) Received: by labpg10 with SMTP id pg10sf3019786lab.2 for ; Wed, 03 Jun 2015 06:17:35 -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=zqKQzSrHyzPAoJacwVhynWmjc3LBqMKhL/aCW66Jnrk=; b=jyhS41mVT7CbR2JHeNBAulk6towViwvdt66VuqYqKDRdnl3yh06vVo4HRaeq+geevn WOGpyR3/HsR+fOIcONs/mVAn4yrZr2jYmrc0WllTQth/Dy1IQBHN7Zhr4UK/O7GLraxp fK+Fvz80wPyUYNtrXuVvJyTfTs9jXfhI2+5VuNE1yMEq6HKnb9JoRPUxt7Pjhdn9i179 acgPc8vH4FCiGpMODiQlrygPD6YfdQE0k6uyi5eSxfIN11Publ+c4URtRirX/PgliAc4 Xei92aZF1wG6pz7abm6RzYFweEz2Tqo3bzPPItDt45AzMU2Mnk/HGLYouFAQI+DOj2Or rvVQ== X-Gm-Message-State: ALoCoQk0bYq8rkIVgydwen4PhDYWZMfgg/Y4Q3cPsfqJCz+otKYugvpazRIHRUITJdkLCIeH4aoe X-Received: by 10.112.93.203 with SMTP id cw11mr30539860lbb.0.1433337455332; Wed, 03 Jun 2015 06:17:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls55421lac.21.gmail; Wed, 03 Jun 2015 06:17:35 -0700 (PDT) X-Received: by 10.152.219.3 with SMTP id pk3mr25069510lac.114.1433337455052; Wed, 03 Jun 2015 06:17:35 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id t2si17993379lbj.163.2015.06.03.06.17.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 06:17:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labko7 with SMTP id ko7so7806163lab.2 for ; Wed, 03 Jun 2015 06:17:34 -0700 (PDT) X-Received: by 10.152.225.166 with SMTP id rl6mr1539527lac.36.1433337454636; Wed, 03 Jun 2015 06:17:34 -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 hn6csp3862017lbb; Wed, 3 Jun 2015 06:17:33 -0700 (PDT) X-Received: by 10.140.238.15 with SMTP id j15mr37650162qhc.4.1433337452760; Wed, 03 Jun 2015 06:17:32 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g22si551201qhc.47.2015.06.03.06.17.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Jun 2015 06:17:32 -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]:35451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z08Xz-0007sx-Ny for patch@linaro.org; Wed, 03 Jun 2015 09:17:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z08XA-0006ue-4i for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:16:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z08X5-0004Lb-3V for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:16:40 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:43314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z08X4-0004Kq-RW; Wed, 03 Jun 2015 09:16:35 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 7C7DA407A3; Wed, 3 Jun 2015 16:16: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 AFB70A64; Wed, 3 Jun 2015 16:08:54 +0300 (MSK) Received: (nullmailer pid 27447 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:37 +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 17/30] hw/timer/arm_timer.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.43 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/timer/arm_timer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c index 1452910..d53f39a 100644 --- a/hw/timer/arm_timer.c +++ b/hw/timer/arm_timer.c @@ -280,14 +280,12 @@ static int sp804_init(SysBusDevice *sbd) { DeviceState *dev = DEVICE(sbd); SP804State *s = SP804(dev); - qemu_irq *qi; - qi = qemu_allocate_irqs(sp804_set_irq, s, 2); sysbus_init_irq(sbd, &s->irq); s->timer[0] = arm_timer_init(s->freq0); s->timer[1] = arm_timer_init(s->freq1); - s->timer[0]->irq = qi[0]; - s->timer[1]->irq = qi[1]; + s->timer[0]->irq = qemu_allocate_irq(sp804_set_irq, s, 0); + s->timer[1]->irq = qemu_allocate_irq(sp804_set_irq, s, 1); memory_region_init_io(&s->iomem, OBJECT(s), &sp804_ops, s, "sp804", 0x1000); sysbus_init_mmio(sbd, &s->iomem);