From nobody Mon Feb 9 12:29:15 2026 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 1635374082942271.6302352097247; Wed, 27 Oct 2021 15:34:42 -0700 (PDT) Received: from localhost ([::1]:42160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfrVI-00084v-Q7 for importer@patchew.org; Wed, 27 Oct 2021 18:34:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfrMN-0007wQ-63 for qemu-devel@nongnu.org; Wed, 27 Oct 2021 18:25:27 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:39498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfrMF-0002ki-CR for qemu-devel@nongnu.org; Wed, 27 Oct 2021 18:25:26 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 7A69E7561CF; Thu, 28 Oct 2021 00:25:16 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 2896675605E; Thu, 28 Oct 2021 00:25:16 +0200 (CEST) Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH v3 05/18] hw/char/sh_serial: Rename type sh_serial_state to SHSerialState Date: Wed, 27 Oct 2021 23:54:31 +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: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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: 1635374083336100005 Coding style says types should be camel case. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/char/sh_serial.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index bbf7586892..6d02e0ad11 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -73,9 +73,9 @@ typedef struct { qemu_irq txi; qemu_irq tei; qemu_irq bri; -} sh_serial_state; +} SHSerialState; =20 -static void sh_serial_clear_fifo(sh_serial_state *s) +static void sh_serial_clear_fifo(SHSerialState *s) { memset(s->rx_fifo, 0, SH_RX_FIFO_LENGTH); s->rx_cnt =3D 0; @@ -86,7 +86,7 @@ static void sh_serial_clear_fifo(sh_serial_state *s) static void sh_serial_write(void *opaque, hwaddr offs, uint64_t val, unsigned size) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; unsigned char ch; =20 trace_sh_serial_write(size, offs, val); @@ -205,7 +205,7 @@ static void sh_serial_write(void *opaque, hwaddr offs, static uint64_t sh_serial_read(void *opaque, hwaddr offs, unsigned size) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; uint32_t ret =3D ~0; =20 #if 0 @@ -309,12 +309,12 @@ static uint64_t sh_serial_read(void *opaque, hwaddr o= ffs, return ret; } =20 -static int sh_serial_can_receive(sh_serial_state *s) +static int sh_serial_can_receive(SHSerialState *s) { return s->scr & (1 << 4); } =20 -static void sh_serial_receive_break(sh_serial_state *s) +static void sh_serial_receive_break(SHSerialState *s) { if (s->feat & SH_SERIAL_FEAT_SCIF) { s->sr |=3D (1 << 4); @@ -323,13 +323,13 @@ static void sh_serial_receive_break(sh_serial_state *= s) =20 static int sh_serial_can_receive1(void *opaque) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; return sh_serial_can_receive(s); } =20 static void sh_serial_timeout_int(void *opaque) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; =20 s->flags |=3D SH_SERIAL_FLAG_RDF; if (s->scr & (1 << 6) && s->rxi) { @@ -339,7 +339,7 @@ static void sh_serial_timeout_int(void *opaque) =20 static void sh_serial_receive1(void *opaque, const uint8_t *buf, int size) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; =20 if (s->feat & SH_SERIAL_FEAT_SCIF) { int i; @@ -369,7 +369,7 @@ static void sh_serial_receive1(void *opaque, const uint= 8_t *buf, int size) =20 static void sh_serial_event(void *opaque, QEMUChrEvent event) { - sh_serial_state *s =3D opaque; + SHSerialState *s =3D opaque; if (event =3D=3D CHR_EVENT_BREAK) { sh_serial_receive_break(s); } @@ -390,9 +390,7 @@ void sh_serial_init(MemoryRegion *sysmem, qemu_irq tei_source, qemu_irq bri_source) { - sh_serial_state *s; - - s =3D g_malloc0(sizeof(sh_serial_state)); + SHSerialState *s =3D g_malloc0(sizeof(*s)); =20 s->feat =3D feat; s->flags =3D SH_SERIAL_FLAG_TEND | SH_SERIAL_FLAG_TDE; --=20 2.21.4