From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 373F8C2D0DB for ; Thu, 23 Jan 2020 17:11:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 034FF20704 for ; Thu, 23 Jan 2020 17:11:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kN0r8jOn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 034FF20704 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iug14-0006VL-Mp for qemu-devel@archiver.kernel.org; Thu, 23 Jan 2020 12:11:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48354) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iueRY-0000Dt-ND for qemu-devel@nongnu.org; Thu, 23 Jan 2020 10:30:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iueRX-0003gl-IA for qemu-devel@nongnu.org; Thu, 23 Jan 2020 10:30:52 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:50264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iueRX-0003fb-CK for qemu-devel@nongnu.org; Thu, 23 Jan 2020 10:30:51 -0500 Received: by mail-wm1-x32d.google.com with SMTP id a5so3022190wmb.0 for ; Thu, 23 Jan 2020 07:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YHdtbMY45khjtvmWy6PilEpBxwmOSqr/+Trm1VbjU/k=; b=kN0r8jOn2k2EbBnuHC37FLkc0sGqBGWaedKaBBKcC9T/M8F8YpA71HbPQ3pblRiGHG yYLMUCxOhqC+VuTp8RYszQnI31LTpZkKQZ5TIzvLv2E3ncRYJJ9uUjJdxjLaa1ZoRrVk QfvzPag7Tlnyjxc50pddeVh0bFzwQFzqf4j8NWkYMb/Ndfs57iNzMVIfvgiRhlhV70Rh rzFO0Xd9FxB5zwoQLQC1tVP0j/XQgyQT70qajV24B53BSZ4noAsWc45FnhZGUaK4V7kS nE1JlAMeqGzRRNh0TPQWPyvpFV/B8niEjWUkYcuB0z4+eVMupy+sBd/BJ/RYWZEfRwvm 3KQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YHdtbMY45khjtvmWy6PilEpBxwmOSqr/+Trm1VbjU/k=; b=VYtN/QU0YrRNLDPGR+msWwiXesm+OxA7E21Chz28ejNIhDUlXIFh9VxRfmRKnhwLNw i1MyGNh6f8YUKskNb7veBwo4WPxvFA4HOVHHO8qGLDhmJkocnUcQrWBM7pw+zT8Lejc6 CqfPTEvS1jase2y25wk1JWvAe3dw9QfxlKjzw/gjzvKf7LQW9F5tsgLHf2IGN8gn3hhV LeXeOm7g51UGLTzVc0pW/KaO1dJprlSTYTSCTcPNSNWvz8g3QJx+jr57APoWwryerwWW 94do4vACdAO8oKVZraNcD7Izwf+pAReYSv/fjin/fTodohA8sZ6jPskv8/Evx9LeWuV9 8ljg== X-Gm-Message-State: APjAAAU2IUDNd9XKgcKT2cUi50WQvSzASjsWLOUqFbJk1MqSsXaz/PC3 FmAXNQIBDk36tqmrnXP1r2kGy5W+XE1UUA== X-Google-Smtp-Source: APXvYqwjxwQkroBTOvCaAEqq0yXBQRrszMHDMElE81oTp4+W7XakNG9LWroo/KzKdZVP37kfEC+yqg== X-Received: by 2002:a1c:a406:: with SMTP id n6mr4673956wme.40.1579793450178; Thu, 23 Jan 2020 07:30:50 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id s139sm2903592wme.35.2020.01.23.07.30.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 07:30:49 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/20] hw/arm: Use helper function to trigger hotplug handler plug Date: Thu, 23 Jan 2020 15:30:28 +0000 Message-Id: <20200123153041.4248-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200123153041.4248-1-peter.maydell@linaro.org> References: <20200123153041.4248-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d 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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Keqian Zhu We can use existing helper function to trigger hotplug handler plug, which makes code clearer. Reviewed-by: Igor Mammedov Signed-off-by: Keqian Zhu Message-id: 20200120012755.44581-3-zhukeqian1@huawei.com Signed-off-by: Peter Maydell --- hw/arm/virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 39ab5f47e0b..656b0081c2c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1934,7 +1934,6 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, static void virt_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - HotplugHandlerClass *hhc; VirtMachineState *vms = VIRT_MACHINE(hotplug_dev); Error *local_err = NULL; @@ -1943,8 +1942,9 @@ static void virt_memory_plug(HotplugHandler *hotplug_dev, goto out; } - hhc = HOTPLUG_HANDLER_GET_CLASS(vms->acpi_dev); - hhc->plug(HOTPLUG_HANDLER(vms->acpi_dev), dev, &error_abort); + hotplug_handler_plug(HOTPLUG_HANDLER(vms->acpi_dev), + dev, &error_abort); + out: error_propagate(errp, local_err); } -- 2.20.1