From nobody Wed Nov 12 23:19:34 2025 Delivered-To: importer@patchew.org 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; 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 ARC-Seal: i=1; a=rsa-sha256; t=1574687596; cv=none; d=zohomail.com; s=zohoarc; b=RMFnK4CSOw8a0M6c9Vo1lrL/i0Cs/OX96K1DendsK/xTW0NmpB5InTIGrLvmW5hQE7C2VbelFHNgqHPaB29pRRd6Yq9JRJXjF2mafMbGwWFUtSuFCmkw5gH+920graOY/dyxvfGS93GwgasGCbF2WSRk/LUkOqFjmtthCSf1+Tg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574687596; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=B+FKimw2XE26YgeI3LTGyTi4HbidnyzOszplbQ1x+1Y=; b=T0vLwZdtXuluCi3J6RZ2c13lyy6rKtMsNUHSwaAbf/vE5B1Su5rde1+yDvIJK7gpDSSJxyuE1t1jFeeaB+MlyIZYn4rMz9T6PaWnO/iVoDU2bdyESqbto3x03XowEhSeGSBxS8vSpA98/bR56Rf0wTc3aIYg+zkJ3VRemtIgwHE= ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157468759658083.99386498628564; Mon, 25 Nov 2019 05:13:16 -0800 (PST) Received: from localhost ([::1]:43740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZEB1-0002Fw-BF for importer@patchew.org; Mon, 25 Nov 2019 08:13:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZE4E-0004dV-DX for qemu-devel@nongnu.org; Mon, 25 Nov 2019 08:06:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZE4C-00069e-5g for qemu-devel@nongnu.org; Mon, 25 Nov 2019 08:06:14 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:45501 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iZE4B-0005RG-PV for qemu-devel@nongnu.org; Mon, 25 Nov 2019 08:06:12 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 9B36F1A225C; Mon, 25 Nov 2019 14:05:05 +0100 (CET) Received: from rtrkw493-lin.domain.local (rtrkw493-lin.domain.local [10.10.14.93]) by mail.rt-rk.com (Postfix) with ESMTPSA id 5EF531A225E; Mon, 25 Nov 2019 14:05:05 +0100 (CET) X-Virus-Scanned: amavisd-new at rt-rk.com From: Filip Bozuta To: qemu-devel@nongnu.org Subject: [PATCH 3/5] mips: mipssim: Renovate coding style Date: Mon, 25 Nov 2019 14:04:56 +0100 Message-Id: <1574687098-26689-4-git-send-email-Filip.Bozuta@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574687098-26689-1-git-send-email-Filip.Bozuta@rt-rk.com> References: <1574687098-26689-1-git-send-email-Filip.Bozuta@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 89.216.37.149 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: pburton@wavecomp.com, aleksandar.rikalo@rt-rk.com, hpoussin@reactos.org, amarkovic@wavecomp.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_mipssim.c hw/net/mipsnet.c All these mips mipssim machine files were edited and all the errors and warrings generated by the checkpatch.pl script were corrected and then the script was ran again to make sure there are no more errors and warnings. Signed-off-by: Filip Bozuta Reviewed-by: Aleksandar Markovic --- hw/net/mipsnet.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c index f7ae1ce..cb3331f 100644 --- a/hw/net/mipsnet.c +++ b/hw/net/mipsnet.c @@ -9,19 +9,19 @@ =20 /* MIPSnet register offsets */ =20 -#define MIPSNET_DEV_ID 0x00 -#define MIPSNET_BUSY 0x08 -#define MIPSNET_RX_DATA_COUNT 0x0c -#define MIPSNET_TX_DATA_COUNT 0x10 -#define MIPSNET_INT_CTL 0x14 -# define MIPSNET_INTCTL_TXDONE 0x00000001 -# define MIPSNET_INTCTL_RXDONE 0x00000002 -# define MIPSNET_INTCTL_TESTBIT 0x80000000 -#define MIPSNET_INTERRUPT_INFO 0x18 -#define MIPSNET_RX_DATA_BUFFER 0x1c -#define MIPSNET_TX_DATA_BUFFER 0x20 - -#define MAX_ETH_FRAME_SIZE 1514 +#define MIPSNET_DEV_ID 0x00 +#define MIPSNET_BUSY 0x08 +#define MIPSNET_RX_DATA_COUNT 0x0c +#define MIPSNET_TX_DATA_COUNT 0x10 +#define MIPSNET_INT_CTL 0x14 +# define MIPSNET_INTCTL_TXDONE 0x00000001 +# define MIPSNET_INTCTL_RXDONE 0x00000002 +# define MIPSNET_INTCTL_TESTBIT 0x80000000 +#define MIPSNET_INTERRUPT_INFO 0x18 +#define MIPSNET_RX_DATA_BUFFER 0x1c +#define MIPSNET_TX_DATA_BUFFER 0x20 + +#define MAX_ETH_FRAME_SIZE 1514 =20 #define TYPE_MIPS_NET "mipsnet" #define MIPS_NET(obj) OBJECT_CHECK(MIPSnetState, (obj), TYPE_MIPS_NET) @@ -64,8 +64,9 @@ static void mipsnet_update_irq(MIPSnetState *s) =20 static int mipsnet_buffer_full(MIPSnetState *s) { - if (s->rx_count >=3D MAX_ETH_FRAME_SIZE) + if (s->rx_count >=3D MAX_ETH_FRAME_SIZE) { return 1; + } return 0; } =20 @@ -73,18 +74,21 @@ static int mipsnet_can_receive(NetClientState *nc) { MIPSnetState *s =3D qemu_get_nic_opaque(nc); =20 - if (s->busy) + if (s->busy) { return 0; + } return !mipsnet_buffer_full(s); } =20 -static ssize_t mipsnet_receive(NetClientState *nc, const uint8_t *buf, siz= e_t size) +static ssize_t mipsnet_receive(NetClientState *nc, + const uint8_t *buf, size_t size) { MIPSnetState *s =3D qemu_get_nic_opaque(nc); =20 - trace_mipsnet_receive(size); - if (!mipsnet_can_receive(nc)) + race_mipsnet_receive(size); + if (!mipsnet_can_receive(nc)) { return 0; + } =20 if (size >=3D sizeof(s->rx_buffer)) { return 0; @@ -115,10 +119,10 @@ static uint64_t mipsnet_ioport_read(void *opaque, hwa= ddr addr, addr &=3D 0x3f; switch (addr) { case MIPSNET_DEV_ID: - ret =3D be32_to_cpu(0x4d495053); /* MIPS */ + ret =3D be32_to_cpu(0x4d495053); /* MIPS */ break; case MIPSNET_DEV_ID + 4: - ret =3D be32_to_cpu(0x4e455430); /* NET0 */ + ret =3D be32_to_cpu(0x4e455430); /* NET0 */ break; case MIPSNET_BUSY: ret =3D s->busy; --=20 2.7.4