From patchwork Sat May 30 07:54:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49255 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5EBF022B40 for ; Sat, 30 May 2015 07:59:45 +0000 (UTC) Received: by lbbti3 with SMTP id ti3sf24239784lbb.1 for ; Sat, 30 May 2015 00:59:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:content-type: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=cLCFo4shbALx7kzVAL9S3GLT8XMb6/ZW2Vaq+cwMAu8=; b=lnkPiQSOnnI2Q91ZNkzZ2qQyBGqj0OeO9t13eWrifsysKteCS+XUqqg9VRyv+d93A5 BdB3h5bljUycimgJB8KI9QeHTgvrO65XbMSdxioGmDxJWxEaRXAb4SeqbfAbtiMHfuZB yebIPQF7ydyghZbYWwoBMWaxXuGqReVUZ7fh/4w+tfOhhj8a+vjTSs1GGIJJHYjK+59q t4gcKAO8hfbOT+jCIZmpryfeZ+GO3IOoOiEC54sBppRYx1gRb4wwYEihcjnEpQMBFfvB P2J6Pgg5Y6nEFMHUF0Sk4UrIg9kC7kWTQFcA8xHVjskeHQYO07MeF+I8TcNFyZB0nStC KkDg== X-Gm-Message-State: ALoCoQnYwQfKhCexBGAvdiVifRUTzXH2iBFUq/o9nWvUhCcdWX56nJNihGJ0mqD2cwDlJRJNgLg1 X-Received: by 10.180.105.226 with SMTP id gp2mr1630651wib.1.1432972784183; Sat, 30 May 2015 00:59:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.98 with SMTP id ln2ls202281lac.91.gmail; Sat, 30 May 2015 00:59:44 -0700 (PDT) X-Received: by 10.112.129.132 with SMTP id nw4mr12002626lbb.122.1432972784052; Sat, 30 May 2015 00:59:44 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id 7si2356610law.133.2015.05.30.00.59.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 May 2015 00:59:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by labko7 with SMTP id ko7so66937813lab.2 for ; Sat, 30 May 2015 00:59:43 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr11568160lak.117.1432972783633; Sat, 30 May 2015 00:59:43 -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 hn6csp888377lbb; Sat, 30 May 2015 00:59:42 -0700 (PDT) X-Received: by 10.140.38.167 with SMTP id t36mr13939652qgt.69.1432972782455; Sat, 30 May 2015 00:59:42 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z18si7591761qkz.12.2015.05.30.00.59.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 30 May 2015 00:59:42 -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]:38650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YybgD-0003XD-NK for patch@linaro.org; Sat, 30 May 2015 03:59:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YybfD-0001z8-RV for qemu-devel@nongnu.org; Sat, 30 May 2015 03:58:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YybfC-0000Yn-Pc for qemu-devel@nongnu.org; Sat, 30 May 2015 03:58:39 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:28721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yybf7-0000X3-Ds; Sat, 30 May 2015 03:58:33 -0400 Received: from 172.24.2.119 (EHLO szxeml431-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BGU05482; Sat, 30 May 2015 15:55:11 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.158.1; Sat, 30 May 2015 15:55:03 +0800 From: Shannon Zhao To: Date: Sat, 30 May 2015 15:54:35 +0800 Message-ID: <1432972477-13504-6-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1432972477-13504-1-git-send-email-zhaoshenglong@huawei.com> References: <1432972477-13504-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.55696CE0.000C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c2324483f50d8e162f9ddf521a4959ea X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.66 Cc: qemu-trivial@nongnu.org, peter.maydell@linaro.org, mjt@tls.msk.ru, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v2 5/7] hw/arm/palm.c: Store irq array in MachineState to fix memory leak 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: patch@linaro.org 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.41 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 --- hw/arm/palm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/palm.c b/hw/arm/palm.c index 7f1cfb8..6fe28e5 100644 --- a/hw/arm/palm.c +++ b/hw/arm/palm.c @@ -156,7 +156,7 @@ static void palmte_onoff_gpios(void *opaque, int line, int level) } } -static void palmte_gpio_setup(struct omap_mpu_state_s *cpu) +static qemu_irq *palmte_gpio_setup(struct omap_mpu_state_s *cpu) { qemu_irq *misc_gpio; @@ -183,6 +183,8 @@ static void palmte_gpio_setup(struct omap_mpu_state_s *cpu) qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[6]); qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[7]); qemu_irq_raise(omap_mpuio_in_get(cpu->mpuio)[11]); + + return misc_gpio; } static struct arm_boot_info palmte_binfo = { @@ -236,7 +238,7 @@ static void palmte_init(MachineState *machine) qemu_add_kbd_event_handler(palmte_button_event, mpu); - palmte_gpio_setup(mpu); + machine->irqs = palmte_gpio_setup(mpu); /* Setup initial (reset) machine state */ if (nb_option_roms) {