From nobody Sat May 18 04:46:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1588586235; cv=none; d=zohomail.com; s=zohoarc; b=KyyfkxdwDtZN4fecAXBbMxr8bzf1LVWXZSYI+YGLb8A+vlWt2bMZyAlVgvDiuHkOXCEVvxpupYdxR6DCRs4CnUzp0hbkRJlqR2rWxMombcqGNsmOf6NeGgrlYPopJir7wv6DB49ZmYlPOS9GYEvlGDZUreQDT5CzH6oAFOO/XF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588586235; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=W13Wy4KjfD9+hwao4Th2t0zPOqXVh48KYVCPXPEX4mw=; b=kH9q5grs0GJIkphHN916H1W8xnq/LsBnxjNgDGs1NrfrUZZEYl95oXYKa21DO0bAUM7iCazDG5yonDhVJMETn2txWnPptdE9syrDuM1kwIh4jNiZm+D+fN25VA7ToIcFdmR2B8VKvQnX9+j75Lw2cDKTtCAaMvantUIPpyytbhg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588586235391176.0964203574598; Mon, 4 May 2020 02:57:15 -0700 (PDT) Received: from localhost ([::1]:41914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVXqc-0003DS-3s for importer@patchew.org; Mon, 04 May 2020 05:57:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVXps-0002ip-06 for qemu-devel@nongnu.org; Mon, 04 May 2020 05:56:28 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:40620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVXpr-0003wH-4X for qemu-devel@nongnu.org; Mon, 04 May 2020 05:56:27 -0400 Received: by mail-wm1-x342.google.com with SMTP id u16so8301270wmc.5 for ; Mon, 04 May 2020 02:56:26 -0700 (PDT) Received: from x1w.redhat.com (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id b4sm17545873wrv.42.2020.05.04.02.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 02:56:24 -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:mime-version :content-transfer-encoding; bh=W13Wy4KjfD9+hwao4Th2t0zPOqXVh48KYVCPXPEX4mw=; b=Su/EaZAY1qaPdtu0EYiXTdNL/DoEzmQXZm2TQSAF9v1HZl/InjW/yZD8RlY5u7yi+W Gb8+nTSE8jxeo8PM/y4ecA/meNgveANjmMx8+hOTb04nX/AWCi8hZBwSOPDzW6A9OD6L dkmm3+iCxrx+CLSaQB8kzg6RJWNPQbxxGKRlARi8R8OTzBaAWZGsyKDf/wZCy1Xl/wry oMNzGSC4lfRIsvIe0VItagTdnTpFJRflpEn6qJXTx4qonrA1+CbonwVmBmf26yv2sLAU h6IKd3QBnwow+gWfeeY1D7Jq5yTxg8LHZtKq2Q4SJdGwTMOgaOyGNX4IrDoRb0Ln8TyV itVA== 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 :mime-version:content-transfer-encoding; bh=W13Wy4KjfD9+hwao4Th2t0zPOqXVh48KYVCPXPEX4mw=; b=nxMI/KPb5hdRFAiEwx1oKNDENelDinEWJCPk5k0yniDXFZbPQRFzyqSgYxajdltPVY 1D3f38dIqwzyyaxFbwWSkjZww5PxnhENGSO4cZAg5qMacAlSIp3YPCq5vMs8ThyIRswG AP2Hm3AR8et5qepCmSngjcnTESU5OM9xDHS+7px36LiE+q1cyE6QhaHK3oTEmE+gPj5Z 6MgQUEZOd1GoV7dgYRYFmYHETVfeiI1o/q9PvGB9EjuqJlO4KzinoqyAkmIf8kGCV4/M t31UgizEl+BvuVfLXUcAxQAZPB7EG1oKpcws62GM834AGGPiAh2nGKaaNU20LsrKJwpG 870w== X-Gm-Message-State: AGi0PuYfODMJuiCNTAMNxisCETf2T91+326Y5XeTarGl7bxg+TQ213yJ hjMAN79UoH7jkBfVvzh0iO0ysf2g X-Google-Smtp-Source: APiQypIMwquopydQlpMk/LvIcrwZhBJtjl4xTPuISfGEynXmkbBSiF37brdA5etafsxzLRN+04ylDw== X-Received: by 2002:a7b:c7d2:: with SMTP id z18mr13441711wmk.109.1588586185150; Mon, 04 May 2020 02:56:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH] hw/char/parallel: Convert reset handler to DeviceReset Date: Mon, 4 May 2020 11:56:23 +0200 Message-Id: <20200504095623.7252-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As TYPE_ISA_PARALLEL inherits from TYPE_ISA_DEVICE, it also inherits from the DEVICE methods. Convert its reset handler into a proper DeviceReset method. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/char/parallel.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/char/parallel.c b/hw/char/parallel.c index 8dd67d1375..f68a96da8e 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -523,6 +523,13 @@ static int parallel_can_receive(void *opaque) return 1; } =20 +static void parallel_isa_reset(DeviceState *dev) +{ + ISAParallelState *isa =3D ISA_PARALLEL(dev); + + parallel_reset(&isa->state); +} + static void parallel_isa_realizefn(DeviceState *dev, Error **errp) { static int index; @@ -552,7 +559,6 @@ static void parallel_isa_realizefn(DeviceState *dev, Er= ror **errp) =20 base =3D isa->iobase; isa_init_irq(isadev, &s->irq, isa->isairq); - qemu_register_reset(parallel_reset, s); =20 qemu_chr_fe_set_handlers(&s->chr, parallel_can_receive, NULL, NULL, NULL, s, NULL, true); @@ -625,6 +631,7 @@ static void parallel_isa_class_initfn(ObjectClass *klas= s, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + dc->reset =3D parallel_isa_reset; dc->realize =3D parallel_isa_realizefn; dc->vmsd =3D &vmstate_parallel_isa; device_class_set_props(dc, parallel_isa_properties); --=20 2.21.3