From patchwork Wed Jun 17 03:00:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49967 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6B5D9205DE for ; Wed, 17 Jun 2015 03:02:02 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf8967468lbb.0 for ; Tue, 16 Jun 2015 20:02:01 -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=hLSoLl4TsLCaGV7H64hFZnUNSnxFuzyrbQvOZwWLSnr96WvwYz3rsvLJUiEYXAAjid IRF776/qMLhAr+2ghLTvj/5QT/Vo7xnL7InGU2Rzw+XoH1v/Dc4Plv3pw3gpTF3W1SSO rfZ10+f6qsq8VsWeSCdRWXBujRbaR57/6/Vs8YjjL5p/BzAul0XNMqhJ9iYp96TSVtXI 4p9LB9QIqS/qb4r6HX91F0x36m6Db13X9vtbvdTgReGlE/bABTg6kPISXBYh6VYvpo7l wiCDs3XCeCXeCx1+o7hu3DUvkSeCUIL6CmzZUx9l7d4suFDdMXWk/pY69MZKrI+Tf6lb wUCA== X-Gm-Message-State: ALoCoQkyNuWqnGArO0QGz9Whz5qJVlwW+VgaTl5ELfA3s7i968hjOCL/XQuK19lpwvuuM1Ievk9+ X-Received: by 10.180.89.231 with SMTP id br7mr6333192wib.0.1434510121188; Tue, 16 Jun 2015 20:02:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.184.168 with SMTP id ev8ls224788lac.44.gmail; Tue, 16 Jun 2015 20:02:01 -0700 (PDT) X-Received: by 10.152.6.39 with SMTP id x7mr5484210lax.18.1434510121052; Tue, 16 Jun 2015 20:02:01 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id xs10si2254907lbb.86.2015.06.16.20.02.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jun 2015 20:02:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbqq2 with SMTP id qq2so22585578lbb.3 for ; Tue, 16 Jun 2015 20:02:00 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr5469625laa.106.1434510120913; Tue, 16 Jun 2015 20:02:00 -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 hn6csp153420lbb; Tue, 16 Jun 2015 20:02:00 -0700 (PDT) X-Received: by 10.140.238.77 with SMTP id j74mr5273170qhc.33.1434510119711; Tue, 16 Jun 2015 20:01:59 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 186si3050993qhw.24.2015.06.16.20.01.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Jun 2015 20:01:59 -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]:43951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z53by-0001sJ-TN for patch@linaro.org; Tue, 16 Jun 2015 23:01:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z53b2-0000uH-7U for qemu-devel@nongnu.org; Tue, 16 Jun 2015 23:01:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z53b1-0005xX-3s for qemu-devel@nongnu.org; Tue, 16 Jun 2015 23:01:00 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:52530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z53at-0005hu-BN; Tue, 16 Jun 2015 23:00:51 -0400 Received: from 172.24.2.119 (EHLO szxeml434-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BHU84682; Wed, 17 Jun 2015 11:00:44 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.158.1; Wed, 17 Jun 2015 11:00:30 +0800 From: Shannon Zhao To: Date: Wed, 17 Jun 2015 11:00:00 +0800 Message-ID: <1434510002-6976-7-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1434510002-6976-1-git-send-email-zhaoshenglong@huawei.com> References: <1434510002-6976-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.5580E2DC.00D1, 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: 30158c6c866eb6b261c8e8dc65f31034 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, mjt@tls.msk.ru, shannon.zhao@linaro.org Subject: [Qemu-devel] [PATCH v3 6/8] 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.217.178 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) {