From nobody Mon Sep 16 20:16:49 2024 Delivered-To: importer2@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+importer2=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 1675193957502991.7288332826151; Tue, 31 Jan 2023 11:39:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMwSs-0006sl-Ad; Tue, 31 Jan 2023 14:38:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMwSq-0006rb-H8 for qemu-devel@nongnu.org; Tue, 31 Jan 2023 14:38:44 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMwSn-0003Ih-Rb for qemu-devel@nongnu.org; Tue, 31 Jan 2023 14:38:44 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 38400746335; Tue, 31 Jan 2023 20:36:13 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id F2A67745712; Tue, 31 Jan 2023 20:36:12 +0100 (CET) Message-Id: <42bcdf2e60211557ec44f11a45d6b465654693b4.1675193329.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 2/6] usb/ohci: Code style fix white space errors MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Howard Spoelstra Date: Tue, 31 Jan 2023 20:36:12 +0100 (CET) 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZM-MESSAGEID: 1675193958113100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell --- hw/usb/hcd-ohci.c | 162 +++++++++++++++++++++++----------------------- 1 file changed, 80 insertions(+), 82 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 9f138e7f25..b2a2de7964 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -60,46 +60,46 @@ struct ohci_hcca { =20 /* Bitfields for the first word of an Endpoint Desciptor. */ #define OHCI_ED_FA_SHIFT 0 -#define OHCI_ED_FA_MASK (0x7f<frame_number, starting_frame);=20 + relative_frame_number =3D USUB(ohci->frame_number, starting_frame); =20 trace_usb_ohci_iso_td_head( ed->head & OHCI_DPTR_MASK, ed->tail & OHCI_DPTR_MASK, @@ -657,8 +657,8 @@ static int ohci_service_iso_td(OHCIState *ohci, struct = ohci_ed *ed) next_offset =3D iso_td.be; } =20 - if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) ||=20 - ((relative_frame_number < frame_count) &&=20 + if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || + ((relative_frame_number < frame_count) && !(OHCI_BM(next_offset, TD_PSW_CC) & 0xe))) { trace_usb_ohci_iso_td_bad_cc_not_accessed(start_offset, next_offse= t); return 1; @@ -1118,7 +1118,7 @@ static int ohci_service_ed_list(OHCIState *ohci, uint= 32_t head) ed.tail & OHCI_DPTR_MASK, ed.next & OHCI_DPTR_MASK); trace_usb_ohci_ed_pkt_flags( OHCI_BM(ed.flags, ED_FA), OHCI_BM(ed.flags, ED_EN), - OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S)!=3D 0, + OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S) !=3D 0, (ed.flags & OHCI_ED_K) !=3D 0, (ed.flags & OHCI_ED_F) = !=3D 0, OHCI_BM(ed.flags, ED_MPS)); =20 @@ -1311,10 +1311,8 @@ static void ohci_port_power(OHCIState *ohci, int i, = int p) if (p) { ohci->rhport[i].ctrl |=3D OHCI_PORT_PPS; } else { - ohci->rhport[i].ctrl &=3D ~(OHCI_PORT_PPS| - OHCI_PORT_CCS| - OHCI_PORT_PSS| - OHCI_PORT_PRS); + ohci->rhport[i].ctrl &=3D ~(OHCI_PORT_PPS | OHCI_PORT_CCS | + OHCI_PORT_PSS | OHCI_PORT_PRS); } } =20 @@ -1858,7 +1856,7 @@ void usb_ohci_init(OHCIState *ohci, DeviceState *dev,= uint32_t num_ports, ohci->num_ports =3D num_ports; if (masterbus) { USBPort *ports[OHCI_MAX_PORTS]; - for(i =3D 0; i < num_ports; i++) { + for (i =3D 0; i < num_ports; i++) { ports[i] =3D &ohci->rhport[i].port; } usb_register_companion(masterbus, ports, num_ports, @@ -1997,7 +1995,7 @@ const VMStateDescription vmstate_ohci_state =3D { VMSTATE_BOOL(async_complete, OHCIState), VMSTATE_END_OF_LIST() }, - .subsections =3D (const VMStateDescription*[]) { + .subsections =3D (const VMStateDescription * []) { &vmstate_ohci_eof_timer, NULL } --=20 2.30.6