From patchwork Fri Aug 19 13:39:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9290669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9C13607FF for ; Fri, 19 Aug 2016 17:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9224294EB for ; Fri, 19 Aug 2016 17:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D38F294F0; Fri, 19 Aug 2016 17:17:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 060B1294EB for ; Fri, 19 Aug 2016 17:17:44 +0000 (UTC) Received: from localhost ([::1]:58297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banQN-0007X1-KQ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Aug 2016 13:17:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banM6-0004mc-LQ for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:13:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1banM3-0002TL-Am for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:13:18 -0400 Received: from mail-ve1eur01on0127.outbound.protection.outlook.com ([104.47.1.127]:10496 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banM2-0002T4-Ie for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:13:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/cEzQh0TeIiLqBIk6wXOhlSiN5zx2xFGVJxkszcZwJw=; b=EKCwMTNQtCTVMgTDPXd35PBRtWyv4siyoF/FvETEe0L2DCu4fmoLW4ZPjoJGuUr9/MwqMycQngWjC0d+y4WDW1nkruAKcwQTUVJCmlwLU9kCbjIp9y2ekMDX9C7ziquaI6qolZR4XSgjpWtSsmU/TxH7EVFC9X4jg2tLjxXbMZw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (195.214.232.10) by DB6PR0802MB2469.eurprd08.prod.outlook.com (10.172.251.17) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Fri, 19 Aug 2016 13:39:46 +0000 From: Roman Kagan To: Date: Fri, 19 Aug 2016 16:39:26 +0300 Message-ID: <1471613966-7267-8-git-send-email-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> References: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AM4PR01CA0021.eurprd01.prod.exchangelabs.com (10.164.74.159) To DB6PR0802MB2469.eurprd08.prod.outlook.com (10.172.251.17) X-MS-Office365-Filtering-Correlation-Id: 4ed661fe-e2b9-4482-d79b-08d3c836491d X-Microsoft-Exchange-Diagnostics: 1; D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/5A5cD/9R/OkVUQnto2KQA1E4=; 4:IkIruGHqb83Y/UWLOVjWhJB7Nok72smED1dGb3ZVlVfGdFI80j1PgEXfa6hnehlW3BMxgBh6iPApVW032H/YCaG9m/k+UUynsxYwNtbIRnV8d/eEl5cXoS69V+LkeFelnbCCjS1kSyU3QZ9/2lx/0IP1XBUyzKLANxHf1IgzS13+7WW0LBIKsFGrlVq6Dg91Z0+EhBAUyS7PzPuYRTiLP5t/GaG39LWffznspKYwdHhfB/VmsBzaYY7XFr8ZoluX+7S3iy0JwYlCAIt/WWBcFI8fAD2lUPGADWw7tXkIGRjeMOIgYdCz/DDJCCc1iiZD4/bmSeV6ObCwo/lJl/Z3HMVg/EPsGwOJhyKyuOfWG/yr24vHb3giZkRqXn3+nKv0bAaGBQyXHhAWmlpQGl3Z1+b+1/UwJCXs775PxJ+NgTk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6043046)(6042046); SRVR:DB6PR0802MB2469; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2469; X-Forefront-PRVS: 0039C6E5C5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(33646002)(229853001)(305945005)(7736002)(81156014)(92566002)(8676002)(81166006)(7846002)(48376002)(105586002)(47776003)(66066001)(50466002)(101416001)(2906002)(4326007)(586003)(36756003)(2351001)(106356001)(86362001)(50986999)(76176999)(3846002)(6116002)(77096005)(5003940100001)(19580395003)(69596002)(19580405001)(97736004)(189998001)(68736007)(2950100001)(53416004)(110136002)(42186005)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0802MB2469; H:rkaganb.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender h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My/Y3PHYE96s+YVv0MayU0k0UXOSO67G0x1p8c//OiSg0YHjvKM5mDt1TyIDexwlH00bI5rZjiRqMoI9/0AJGKl8ZSIpyOhcDbtHK6qd+ayhO6l4FJz1vFASs2+lV5OuKhtAOQtBOWO6pPU65bxtWSSpDCo/85CjwnjG4MUTfHzlTTcAQzeRAZV/e SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2469; 20:iRoyAJNhJFekzLMAMXmQz2TOfMazrHxGkVMf0znNi89HjcJekLrSXODd9kYy+vLD7rjVA1z6qkWVnvMD/dHfBnm0aiFRTe7elo8EOFbIBcwuRaI20xLWBacYFpc4QW1WB1StB+wMeRpZcd3etg+vUhCQx+oiMT8F3lNyRoLTt1k= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2016 13:39:46.4228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2469 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.1.127 Subject: [Qemu-devel] [PATCH v2 6/6] virtio-balloon: drop reset handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Denis V. Lunev" , Ladi Prosek , Roman Kagan , Stefan Hajnoczi , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since the release of ->stat_vq_elem is now ensured by the vm state change handler, there's no need in the reset handler doing it. Signed-off-by: Roman Kagan Cc: "Michael S. Tsirkin" Cc: Ladi Prosek Cc: Stefan Hajnoczi --- hw/virtio/virtio-balloon.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 056ae49..1557650 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -465,16 +465,6 @@ static void virtio_balloon_device_unrealize(DeviceState *dev, Error **errp) virtio_cleanup(vdev); } -static void virtio_balloon_device_reset(VirtIODevice *vdev) -{ - VirtIOBalloon *s = VIRTIO_BALLOON(vdev); - - if (s->stats_vq_elem != NULL) { - g_free(s->stats_vq_elem); - s->stats_vq_elem = NULL; - } -} - static void virtio_balloon_instance_init(Object *obj) { VirtIOBalloon *s = VIRTIO_BALLOON(obj); @@ -506,7 +496,6 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_MISC, dc->categories); vdc->realize = virtio_balloon_device_realize; vdc->unrealize = virtio_balloon_device_unrealize; - vdc->reset = virtio_balloon_device_reset; vdc->get_config = virtio_balloon_get_config; vdc->set_config = virtio_balloon_set_config; vdc->get_features = virtio_balloon_get_features;