From patchwork Tue Feb 26 19:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 1048524 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=209.51.188.17; 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=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4488LC5gvYz9s7T for ; Wed, 27 Feb 2019 06:40:33 +1100 (AEDT) Received: from localhost ([127.0.0.1]:60278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyiac-0006IS-8k for incoming@patchwork.ozlabs.org; Tue, 26 Feb 2019 14:40:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyiV2-0002Kv-Nq for qemu-devel@nongnu.org; Tue, 26 Feb 2019 14:34:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyiV0-0006Ts-Hl for qemu-devel@nongnu.org; Tue, 26 Feb 2019 14:34:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47718) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyiUg-0005xB-SS; Tue, 26 Feb 2019 14:34:23 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3284F300DA73; Tue, 26 Feb 2019 19:34:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-92.ams2.redhat.com [10.36.116.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C265F5D6A6; Tue, 26 Feb 2019 19:34:12 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1891011384DA; Tue, 26 Feb 2019 20:34:08 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 26 Feb 2019 20:34:01 +0100 Message-Id: <20190226193408.23862-5-armbru@redhat.com> In-Reply-To: <20190226193408.23862-1-armbru@redhat.com> References: <20190226193408.23862-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 26 Feb 2019 19:34:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 04/11] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI* 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: kwolf@redhat.com, qemu-block@nongnu.org, alex.bennee@linaro.org, mreitz@redhat.com, qemu-ppc@nongnu.org, lersek@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" pflash_cfi01.c and pflash_cfi02.c start their identifiers with pflash_cfi01_ and pflash_cfi02_ respectively, except for CFI_PFLASH01(), TYPE_CFI_PFLASH01, CFI_PFLASH02(), TYPE_CFI_PFLASH02. Rename for consistency. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- hw/block/pflash_cfi01.c | 12 ++++++------ hw/block/pflash_cfi02.c | 12 ++++++------ include/hw/block/flash.h | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index d381f14e3c..f75f0a6998 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -59,8 +59,8 @@ do { \ #define DPRINTF(fmt, ...) do { } while (0) #endif -#define CFI_PFLASH01(obj) \ - OBJECT_CHECK(PFlashCFI01, (obj), TYPE_CFI_PFLASH01) +#define PFLASH_CFI01(obj) \ + OBJECT_CHECK(PFlashCFI01, (obj), TYPE_PFLASH_CFI01) #define PFLASH_BE 0 #define PFLASH_SECURE 1 @@ -698,7 +698,7 @@ static const MemoryRegionOps pflash_cfi01_ops = { static void pflash_cfi01_realize(DeviceState *dev, Error **errp) { - PFlashCFI01 *pfl = CFI_PFLASH01(dev); + PFlashCFI01 *pfl = PFLASH_CFI01(dev); uint64_t total_len; int ret; uint64_t blocks_per_device, sector_len_per_device, device_len; @@ -926,7 +926,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data) static const TypeInfo pflash_cfi01_info = { - .name = TYPE_CFI_PFLASH01, + .name = TYPE_PFLASH_CFI01, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(PFlashCFI01), .class_init = pflash_cfi01_class_init, @@ -949,7 +949,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base, uint16_t id2, uint16_t id3, int be) { - DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH01); + DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI01); if (blk) { qdev_prop_set_drive(dev, "drive", blk, &error_abort); @@ -966,7 +966,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base, qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); - return CFI_PFLASH01(dev); + return PFLASH_CFI01(dev); } MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 9f8486e4cf..c0869fc417 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -57,8 +57,8 @@ do { \ #define PFLASH_LAZY_ROMD_THRESHOLD 42 -#define CFI_PFLASH02(obj) \ - OBJECT_CHECK(PFlashCFI02, (obj), TYPE_CFI_PFLASH02) +#define PFLASH_CFI02(obj) \ + OBJECT_CHECK(PFlashCFI02, (obj), TYPE_PFLASH_CFI02) struct PFlashCFI02 { /*< private >*/ @@ -534,7 +534,7 @@ static const MemoryRegionOps pflash_cfi02_ops_le = { static void pflash_cfi02_realize(DeviceState *dev, Error **errp) { - PFlashCFI02 *pfl = CFI_PFLASH02(dev); + PFlashCFI02 *pfl = PFLASH_CFI02(dev); uint32_t chip_len; int ret; Error *local_err = NULL; @@ -706,7 +706,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data) } static const TypeInfo pflash_cfi02_info = { - .name = TYPE_CFI_PFLASH02, + .name = TYPE_PFLASH_CFI02, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(PFlashCFI02), .class_init = pflash_cfi02_class_init, @@ -731,7 +731,7 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base, uint16_t unlock_addr1, int be) { - DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH02); + DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI02); if (blk) { qdev_prop_set_drive(dev, "drive", blk, &error_abort); @@ -751,5 +751,5 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base, qdev_init_nofail(dev); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); - return CFI_PFLASH02(dev); + return PFLASH_CFI02(dev); } diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 51d8f60c65..333005d9ff 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -7,7 +7,7 @@ /* pflash_cfi01.c */ -#define TYPE_CFI_PFLASH01 "cfi.pflash01" +#define TYPE_PFLASH_CFI01 "cfi.pflash01" typedef struct PFlashCFI01 PFlashCFI01; @@ -24,7 +24,7 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl); /* pflash_cfi02.c */ -#define TYPE_CFI_PFLASH02 "cfi.pflash02" +#define TYPE_PFLASH_CFI02 "cfi.pflash02" typedef struct PFlashCFI02 PFlashCFI02;