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: 10600277 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1F65933 for ; Fri, 14 Sep 2018 05:12:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C2D2B2A7 for ; Fri, 14 Sep 2018 05:12:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46F912B2C2; Fri, 14 Sep 2018 05:12:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFDC82B2A7 for ; Fri, 14 Sep 2018 05:12:02 +0000 (UTC) Received: from localhost ([::1]:47596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0gOg-0006DE-6g for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Sep 2018 01:12:02 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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,