From patchwork Fri Sep 14 05:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Qiang X-Patchwork-Id: 969623 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=fail (p=none dis=none) header.from=gmail.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="A7i58X0G"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42BNsr5rC0z9s9N for ; Fri, 14 Sep 2018 15:11:44 +1000 (AEST) Received: from localhost ([::1]:47595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0gOM-0005u6-Bl for incoming@patchwork.ozlabs.org; Fri, 14 Sep 2018 01:11:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0gO5-0005to-1H for qemu-devel@nongnu.org; Fri, 14 Sep 2018 01:11:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0gO1-00059A-R8 for qemu-devel@nongnu.org; Fri, 14 Sep 2018 01:11:24 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:40734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0gO1-00057s-AB for qemu-devel@nongnu.org; Fri, 14 Sep 2018 01:11:21 -0400 Received: by mail-pf1-x443.google.com with SMTP id s13-v6so3717118pfi.7 for ; Thu, 13 Sep 2018 22:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3M2B9Fywfigw1fpsVntY2wZ7/sS66nF5pUjgxpq+b0Y=; b=A7i58X0GEmorgIldtDVuVzg/gzeux0QlDLSSfVMs39DLuJ9RCHoaEbWnBI+urS+lD5 AoOU6TmghIzb06mbIc5fHD5815nbvO7uucXOf01SWeHioB9vDdOoV9FnvMhnERHceeL7 AKbLf8xNFtzA/E+gqNsV/1+dXdVtrlbwOfsukFHcC23j/zBoHG7jr9jHVWcZwwhX2cD3 LznwYYRQR/4Rpu6RzHGz/iM1a9vkrZrR/3w/4mlElBORSzgLCkCcWIRKoQ+tua/fZP6A +SlDt/qXZCpfUzO/BkIU4FeagAgLXeLbh3r+LVlrPpZyMxRDjsUjYR1EJKQoqBBmOxS3 DoPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3M2B9Fywfigw1fpsVntY2wZ7/sS66nF5pUjgxpq+b0Y=; b=tLLFzyiaXpdg2/vnUeK2ttYakQaOjAkVsDZXRVtYUtmbSL275aQScr7USG8Ba5hm0b EJJY0y5ZK2XOqWrq9Fy2/c8lgJ3c7yokv4ikWcB8liwWsZmUAEKclZu1I/GkZF+233rk YxjcJlt2ocZQm7/BE0btR2bce353pAayWo7WUcPbUSQLKLsTglYVUeyN+5uI70pJmGMa G2Fe1ji/bbYuXiEWxh6n4Rza3lD3zMk684ELbBl7QSK6fjv9WwuwXy1dHwN0ofBnyD6W Cqk0d7gyqrL2+AY73vl6aSzuA0UlB4FuQHv8xwG6u4h6wXnajlo4g35EEmxIepRVjZHS ePPA== X-Gm-Message-State: APzg51AiC5r5sksABnvF4RfoyoG//G0nNXp2wU3+xfyM5i5y9vvK8DIj hsc5kHQFS6tTSoCqRfhL5DA= X-Google-Smtp-Source: ANB0VdZA+RaJeYZ54ukux3sy0ptL2rYDpnwt6eNkSzKHFqikat/w7AJaHIYZysAHM3ggtwu/kMDdKw== X-Received: by 2002:a62:51c6:: with SMTP id f189-v6mr10548175pfb.7.1536901879373; Thu, 13 Sep 2018 22:11:19 -0700 (PDT) Received: from localhost.localdomain.localdomain ([103.65.40.101]) by smtp.gmail.com with ESMTPSA id p4-v6sm7133229pgs.75.2018.09.13.22.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 22:11:18 -0700 (PDT) From: Li Qiang To: jslaby@suse.cz, pbonzini@redhat.com Date: Thu, 13 Sep 2018 22:11:11 -0700 Message-Id: <1536901871-2729-1-git-send-email-liq3ea@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::443 Subject: [Qemu-devel] [PATCH] hw: edu: replace device name with macro 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: Li Qiang , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just as other devices do. Signed-off-by: Li Qiang --- hw/misc/edu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index df26a4d046..0687ffd343 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -30,7 +30,8 @@ #include "qemu/main-loop.h" /* iothread mutex */ #include "qapi/visitor.h" -#define EDU(obj) OBJECT_CHECK(EduState, obj, "edu") +#define TYPE_PCI_EDU_DEVICE "edu" +#define EDU(obj) OBJECT_CHECK(EduState, obj, TYPE_PCI_EDU_DEVICE) #define FACT_IRQ 0x00000001 #define DMA_IRQ 0x00000100 @@ -414,7 +415,7 @@ static void pci_edu_register_types(void) { }, }; static const TypeInfo edu_info = { - .name = "edu", + .name = TYPE_PCI_EDU_DEVICE, .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(EduState), .instance_init = edu_instance_init,