From patchwork Mon Apr 29 17:00:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 163079 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp2162401ill; Mon, 29 Apr 2019 10:29:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVK8vTv6JnZhXQLpFXLDV+JcV+/2RuuMtwgy9+nxNeBqS8dIWOP8ooicupuis2C/z29NYp X-Received: by 2002:a05:6000:118a:: with SMTP id g10mr20916594wrx.233.1556558974037; Mon, 29 Apr 2019 10:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556558974; cv=none; d=google.com; s=arc-20160816; b=o/7Qfwlt26kwIV7++w5BLBfk6FcVqL5EJblTi4QbpA6l3aQn42R75X+WOV1TqhBr9+ LBpGDJFAV+10xy15bYJ9EOaqoszIfWcuzKwq5scwU7QmFmgEf68KyPrJUwkBblcbGmF4 lH/aqMcRE5Y3xyISM6yGko38U7Kf/iQhX3iwVrW14DqC5m+rqf3F4Yl/V4bhbr/zisUI LUuCOSCq7Tl5SPCRYGhGcv75voAhn6WWLdmAzBavvO4PftzJraFNej0Ich4uUpuTcGBH 8L98r2p2DGbWw4IbhkcYnpkfqS/EyV5MwcltCj6tXbBRgC5ca1gW/1icKB1WKGnXHb7Z 9zCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=dtay1t/8F0wroE/4gRl+DMjWaRAg1S7IMqSKkwsLaCo=; b=DlXSDAJYvjno88xMqjK7nd/EIu09MQFtrBAzBtidxh2kdNxH/uP/BPHnmEaNmSMZFN LSW8glETQ7ckQoTlHbqRflHDXBl6lgCjhdJ+5wv6eywaU7Lyuzq1Gy1O+cTxYiFQYV3m CFEuKdoLib4Nkc2crv0WkZNaMwMaXzASS/M7UqA5mIrZICmwzHORFwO0URfiJAzFW5vZ jecFduDsu4dqcQPfSBy6y4sKfST1s7y13wdTt3Z1i9ShAdVN8jZwUeCh3SREs1md58d0 GnSE6lJeuQGFn1clxr0aTSorz/39Wg2U6K2SeekFtY2Ugk87S6wxA9TFmgl3rfXPyJLH nNYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kG1MXo4S; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k17si91990wrl.442.2019.04.29.10.29.33 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 29 Apr 2019 10:29:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kG1MXo4S; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:32770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLA5s-0004a3-U3 for patch@linaro.org; Mon, 29 Apr 2019 13:29:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hL9et-0004uX-AG for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hL9er-0006mr-OU for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:39 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hL9eq-0006fx-6N for qemu-devel@nongnu.org; Mon, 29 Apr 2019 13:01:36 -0400 Received: by mail-wr1-x42e.google.com with SMTP id h4so17116702wre.7 for ; Mon, 29 Apr 2019 10:01:26 -0700 (PDT) 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=dtay1t/8F0wroE/4gRl+DMjWaRAg1S7IMqSKkwsLaCo=; b=kG1MXo4S3I1ItrI3uyPt/Hj6W21N7HbTD9J7HHhFeC0tBAcCvNsImuMAmnETWXcwfQ oCmjxudfPApUFH1g3pv5o2PfaWJKwQJZIn8UXg2eckn+aLFWgNqUc3jmIwB3vs1REqWI gcPykMS2Vw9HoGbdSY/QSWthnl2d7IirC3riEeuvcpAYJ/HI3bmXym4c8CQLxfc7gp/P 6i/gI34DAElDG/P2n0zXoZOebsZPCPCLhsIVParDdqHrvuXvswxhdZVwLqeaiQQEU7pA cyYZxEnJLhsqhs21gxTeoDCdcsJyn+EG5j4gzwVhpJHpDiPhix0qMJ+Fu0GtiYNPfCCl G6Pg== 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=dtay1t/8F0wroE/4gRl+DMjWaRAg1S7IMqSKkwsLaCo=; b=Vfw8EjJxT13n09CTHnA3F+vSUR5SDmac1TsoyjeGAeAVwxn8e1o58m0RY6Rhsx/AfY kXEIGv21IE/BL4y27uaAnxNLPJGCoOVSD/6yPpV4CkKWBmDHm66DTcrvzqc+splrPBNf NxLvj9RIpNF8ad9TWpWejXEVUnwSHToTtKJkWZhd2IAfARrTA4xcj6C+mkoRWWuQYT8b z8eTEg8l2SxjJy5P3WyI78jGAj78ZUMAjgdo+rWR5MDxb2Bba7yZaTr4Cp2wFGl1UpHx j4PrHZLkuLfb9+Rqb1lIgf/x1lLRLEQgj8CBKIWYUf0j2DIZAOyZ+oOlSWVag8+rk3Pf DI8Q== X-Gm-Message-State: APjAAAUloQhlhsrsameaoBQQFvNvJRfVKYBkiLu4ZICf5RCO+DByoCe7 4Wh0+DoyDrEUAxKpNyJJC8y5xS0/iw4= X-Received: by 2002:adf:f14e:: with SMTP id y14mr25310800wro.276.1556557285145; Mon, 29 Apr 2019 10:01:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a13sm36896wmj.39.2019.04.29.10.01.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 10:01:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 29 Apr 2019 18:00:29 +0100 Message-Id: <20190429170030.11323-42-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190429170030.11323-1-peter.maydell@linaro.org> References: <20190429170030.11323-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e Subject: [Qemu-devel] [PULL 41/42] hw/net/lan9118: Export TYPE_LAN9118 and use it instead of hardcoded string 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Message-id: 20190412165416.7977-12-philmd@redhat.com Signed-off-by: Peter Maydell --- include/hw/net/lan9118.h | 2 ++ hw/arm/exynos4_boards.c | 3 ++- hw/arm/mps2-tz.c | 3 ++- hw/net/lan9118.c | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/include/hw/net/lan9118.h b/include/hw/net/lan9118.h index d13d8cd3d22..500acb4c143 100644 --- a/include/hw/net/lan9118.h +++ b/include/hw/net/lan9118.h @@ -14,6 +14,8 @@ #include "hw/irq.h" #include "net/net.h" +#define TYPE_LAN9118 "lan9118" + void lan9118_init(NICInfo *, uint32_t, qemu_irq); #endif diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 750162cc95a..ea8100f65a8 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -32,6 +32,7 @@ #include "hw/arm/arm.h" #include "exec/address-spaces.h" #include "hw/arm/exynos4210.h" +#include "hw/net/lan9118.h" #include "hw/boards.h" #undef DEBUG @@ -92,7 +93,7 @@ static void lan9215_init(uint32_t base, qemu_irq irq) /* This should be a 9215 but the 9118 is close enough */ if (nd_table[0].used) { qemu_check_nic_model(&nd_table[0], "lan9118"); - dev = qdev_create(NULL, "lan9118"); + dev = qdev_create(NULL, TYPE_LAN9118); qdev_set_nic_properties(dev, &nd_table[0]); qdev_prop_set_uint32(dev, "mode_16bit", 1); qdev_init_nofail(dev); diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index f79f090a4ac..7832408bb70 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -56,6 +56,7 @@ #include "hw/arm/armsse.h" #include "hw/dma/pl080.h" #include "hw/ssi/pl022.h" +#include "hw/net/lan9118.h" #include "net/net.h" #include "hw/core/split-irq.h" @@ -244,7 +245,7 @@ static MemoryRegion *make_eth_dev(MPS2TZMachineState *mms, void *opaque, * except that it doesn't support the checksum-offload feature. */ qemu_check_nic_model(nd, "lan9118"); - mms->lan9118 = qdev_create(NULL, "lan9118"); + mms->lan9118 = qdev_create(NULL, TYPE_LAN9118); qdev_set_nic_properties(mms->lan9118, nd); qdev_init_nofail(mms->lan9118); diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c index a428b16eda5..b29e3fee49f 100644 --- a/hw/net/lan9118.c +++ b/hw/net/lan9118.c @@ -175,7 +175,6 @@ static const VMStateDescription vmstate_lan9118_packet = { } }; -#define TYPE_LAN9118 "lan9118" #define LAN9118(obj) OBJECT_CHECK(lan9118_state, (obj), TYPE_LAN9118) typedef struct {