From nobody Fri Dec 19 20:54:30 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=eik.bme.hu Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1635527030680694.8104638999805; Fri, 29 Oct 2021 10:03:50 -0700 (PDT) Received: from localhost ([::1]:43634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgVIC-0004Sw-EB for importer@patchew.org; Fri, 29 Oct 2021 13:03:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgUvr-0007C2-C3 for qemu-devel@nongnu.org; Fri, 29 Oct 2021 12:40:43 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:51109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgUvn-00063o-O1 for qemu-devel@nongnu.org; Fri, 29 Oct 2021 12:40:43 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 2C57A7561E3; Fri, 29 Oct 2021 18:40:27 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 8CFFF756040; Fri, 29 Oct 2021 18:40:26 +0200 (CEST) Message-Id: <9dc1bb680d5dea2c45b04fff4c00431e4b76e322.1635524617.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH v5 10/25] hw/intc/sh_intc: Use existing macro instead of local one Date: Fri, 29 Oct 2021 18:23:36 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: Peter Maydell , Richard Henderson , Magnus Damm , Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1635527031723100001 The INTC_A7 local macro does the same as the A7ADDR from include/sh/sh.h so use the latter and drop the local macro definition. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/intc/sh_intc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index c1058d97c0..0bd27aaf4f 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -16,8 +16,6 @@ #include "hw/sh4/sh.h" #include "trace.h" =20 -#define INTC_A7(x) ((x) & 0x1fffffff) - void sh_intc_toggle_source(struct intc_source *source, int enable_adj, int assert_adj) { @@ -112,12 +110,12 @@ int sh_intc_get_pending_vector(struct intc_desc *desc= , int imask) static unsigned int sh_intc_mode(unsigned long address, unsigned long set_reg, unsigned long clr_= reg) { - if ((address !=3D INTC_A7(set_reg)) && - (address !=3D INTC_A7(clr_reg))) + if ((address !=3D A7ADDR(set_reg)) && + (address !=3D A7ADDR(clr_reg))) return INTC_MODE_NONE; =20 if (set_reg && clr_reg) { - if (address =3D=3D INTC_A7(set_reg)) { + if (address =3D=3D A7ADDR(set_reg)) { return INTC_MODE_DUAL_SET; } else { return INTC_MODE_DUAL_CLR; @@ -297,11 +295,11 @@ static unsigned int sh_intc_register(MemoryRegion *sy= smem, =20 #define SH_INTC_IOMEM_FORMAT "interrupt-controller-%s-%s-%s" snprintf(name, sizeof(name), SH_INTC_IOMEM_FORMAT, type, action, "p4"); - memory_region_init_alias(iomem_p4, NULL, name, iomem, INTC_A7(address)= , 4); + memory_region_init_alias(iomem_p4, NULL, name, iomem, A7ADDR(address),= 4); memory_region_add_subregion(sysmem, P4ADDR(address), iomem_p4); =20 snprintf(name, sizeof(name), SH_INTC_IOMEM_FORMAT, type, action, "a7"); - memory_region_init_alias(iomem_a7, NULL, name, iomem, INTC_A7(address)= , 4); + memory_region_init_alias(iomem_a7, NULL, name, iomem, A7ADDR(address),= 4); memory_region_add_subregion(sysmem, A7ADDR(address), iomem_a7); #undef SH_INTC_IOMEM_FORMAT =20 --=20 2.21.4