From patchwork Tue Jun 19 01:42:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 931344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HMivgnSG"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418tT86WBnz9s3C for ; Tue, 19 Jun 2018 13:18:19 +1000 (AEST) Received: from localhost ([::1]:38966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV79r-0007wd-MB for incoming@patchwork.ozlabs.org; Mon, 18 Jun 2018 23:18:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5jl-0003FF-QT for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:47:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5jk-0000vP-Ot for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:47:13 -0400 Received: from mail-ot0-x229.google.com ([2607:f8b0:4003:c0f::229]:43682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5jk-0000vG-Hi; Mon, 18 Jun 2018 21:47:12 -0400 Received: by mail-ot0-x229.google.com with SMTP id i19-v6so20746164otk.10; Mon, 18 Jun 2018 18:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=qAoGHw69s/9NyudgDsjO5zXUThKXPUmDUY+0d2D9acE=; b=HMivgnSGxonH5QgQH8wMG5jprRqz8M164XfDsvuvLsH9ivH1I9tMCBDKXurJRfyA1L 9dpGukF78Dq1hAB54keJvXcAMEY3vzqEm84YM5OHDebz5CSVb9FuyxrUQIo48W6JBXqy ZX6BtCOvYdZZ4dz78bs6QmolzX4GWPFLUee8QrVbmKmS3VkP55sz2ndWJ14kihEy800A HHcnzqb0aW8nmHUvGM9Ts92CdFWMY4ROPxaWrTBgA3hf3Vzb3QsHhA31ZAWsKWr8rr3h h47tzGaHiqzygKzH234PwoaO9zR9gzgSyPQuyibtAffryYQtESXSm7mwhh0AI1GQW1Ch 3ygQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=qAoGHw69s/9NyudgDsjO5zXUThKXPUmDUY+0d2D9acE=; b=ELJYleq7rRqENlBwpW0HqX6KS+uLig94tQvqsFziwfXnIioF6jlMSJ3xF8paphG3A3 6i/xRxPQVsEYFplW3GqFV+/kECxFo8tLz3tdIsUxYEp0dxJ7F5HfSUBbWcER5APqOoRD Pc8J+uaxKyQoOtJWusTkwcFqqag8q28qLPqDX44YlRBIyLpGLow9diupANQGOiwtSpqJ 7GbgpolCplxYFZI2huEvGVEklLiu+23fSMiE4prEQkIrgTPHiwX0M2mFghwi5vyjZ/yY kMKdPs2pXNeek6Eir8AeuYYogI3AUMiw/aAe611Ln9RdhC0IkRykEjK3sE85ZGeaShv1 Vhrg== X-Gm-Message-State: APt69E1VXmLnRVq2q1TnBqz24dAbZPuqTUoOkgguDyk/S3LQLDO2fHxL LnmQqEN4wfgduVpRh+8dqi4iwd06pHg= X-Google-Smtp-Source: ADUXVKIWZIofsePsMMGySTCe++NxH2cCLxDu8jpcMGUGdkMNjlhbiIKqx4pGmlZBH/nxuP5xYbsK+Q== X-Received: by 2002:a9d:6245:: with SMTP id i5-v6mr9866012otk.253.1529372831357; Mon, 18 Jun 2018 18:47:11 -0700 (PDT) Received: from localhost ([2600:1700:70:e488:b0ee:9bda:ee6f:91be]) by smtp.gmail.com with ESMTPSA id 64-v6sm7820417ots.36.2018.06.18.18.47.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:47:10 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:48 -0500 Message-Id: <20180619014319.28272-83-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::229 Subject: [Qemu-devel] [PATCH 082/113] virtio-ccw: common 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: Cornelia Huck , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Cornelia Huck All the different virtio ccw devices use the same reset handler, so let's move setting it into the base virtio ccw device class. CC: qemu-stable@nongnu.org Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Halil Pasic Signed-off-by: Cornelia Huck (cherry picked from commit 0c53057adb04d254bc09511880670c92ab185fc6) Signed-off-by: Michael Roth --- hw/s390x/virtio-ccw.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 8f2998e8ac..3197ca30be 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1344,7 +1344,6 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_net_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_net_properties; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); } @@ -1372,7 +1371,6 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_blk_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_blk_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } @@ -1400,7 +1398,6 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_serial_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_serial_properties; set_bit(DEVICE_CATEGORY_INPUT, dc->categories); } @@ -1428,7 +1425,6 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_balloon_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_balloon_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); } @@ -1456,7 +1452,6 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_scsi_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_scsi_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } @@ -1483,7 +1478,6 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data) k->realize = vhost_ccw_scsi_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = vhost_ccw_scsi_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } @@ -1520,7 +1514,6 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_rng_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_rng_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); } @@ -1558,7 +1551,6 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_crypto_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_crypto_properties; set_bit(DEVICE_CATEGORY_MISC, dc->categories); } @@ -1596,7 +1588,6 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_gpu_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_gpu_properties; dc->hotpluggable = false; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); @@ -1625,7 +1616,6 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data) k->realize = virtio_ccw_input_realize; k->unrealize = virtio_ccw_unrealize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_input_properties; set_bit(DEVICE_CATEGORY_INPUT, dc->categories); } @@ -1729,6 +1719,7 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data) dc->realize = virtio_ccw_busdev_realize; dc->unrealize = virtio_ccw_busdev_unrealize; dc->bus_type = TYPE_VIRTUAL_CSS_BUS; + dc->reset = virtio_ccw_reset; } static const TypeInfo virtio_ccw_device_info = { @@ -1805,7 +1796,6 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data) k->unrealize = virtio_ccw_unrealize; k->realize = virtio_ccw_9p_realize; - dc->reset = virtio_ccw_reset; dc->props = virtio_ccw_9p_properties; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); } @@ -1855,7 +1845,6 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data) k->unrealize = virtio_ccw_unrealize; set_bit(DEVICE_CATEGORY_MISC, dc->categories); dc->props = vhost_vsock_ccw_properties; - dc->reset = virtio_ccw_reset; } static void vhost_vsock_ccw_instance_init(Object *obj)