From patchwork Mon Feb 27 14:01:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1748886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) 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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=L6n1DOx7; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQNNG5VG1z1yX0 for ; Tue, 28 Feb 2023 01:36:14 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWeBV-0003hO-Pn; Mon, 27 Feb 2023 09:08:57 -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 1pWeBJ-0003Kx-I1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:47 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBH-0000RN-2P for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:45 -0500 Received: by mail-wr1-x42e.google.com with SMTP id v16so3558519wrn.0 for ; Mon, 27 Feb 2023 06:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=L6n1DOx7pALKiVXYUoeDPStjd51rc+v0eSD3CWjx1DTmOhqhH14RsfSIrP92Iw5AC6 QzZGIxyU35vuCr7jYsGlKSB1cEb097HRtKCVt4uKhnioDXGG5Orvnd6fnbPc7MVA7dU0 lEbeBSqaO8jm7SLJCAEKS+JkdYB3NXkw4eMEhc2Z8naGUvitVhHChKXPUdmBahpROo2f CDcPkU0A2NEWSavukFq8fvwzMCayCPA/cIn6PkiRFz+FUpg+sKiLvwldJcRhaYS8F9CG mKNPv/znqHe1V6DZGLfwGpaIxJsteb8e5hcfQxQBjmU04vCrvegvwhTIqLHv3AoFe7px eOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=4ABbjP6hPExkDNW34QrpYMPfoFGt1kDgD2d6gvNzafFh7paJAUAtl5m6Dt2ZIoqtyL fg/DEqhrF99CU8eVOtMcuz5Tf3yS/ohK7n5MEItsBRbSt+pU5iAAMSi9OdwRY3SBHu3k nUkbGrC2uHuV9l4cr9J+mD0DCxMFWM9RUL8Jj8YwVjg9Nh2mDMW5b8z0FZ5ieWHEBzEl 7T2YehBVOuaTFYT+zRaCJm8BiG5vUjkjbr2rEImA6xtexgFnmlSvy0DcFrJU2QLth1/S sBmH2P/bBDt1WLg0E08SlIWYsEPK7bQn6Dl9wLUAaLvvwk1q82FS4C9Ljn5Kj/eH7l4D i6Bg== X-Gm-Message-State: AO0yUKVKGqyrSaRYMNdTn2bzXO1UaRYCsswnn5eq67wstPychmFaKkGk 4WjZOqIFY5S12qHgBwInlQ5qFtDy2qzLi1Fv X-Google-Smtp-Source: AK7set+fSdcHbgM5Qai0jTV5aqkeTWd+Jpprmxm506go4Q4rx4yr8NtQ932uSPoBtGCAuHczpDsDNw== X-Received: by 2002:a5d:42c4:0:b0:2c7:1c44:5aae with SMTP id t4-20020a5d42c4000000b002c71c445aaemr9468120wrr.12.1677506920085; Mon, 27 Feb 2023 06:08:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i2-20020adfdec2000000b002c71dd1109fsm7170449wrn.47.2023.02.27.06.08.39 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 080/126] hw/usb/ohci: Code style fix white space errors Date: Mon, 27 Feb 2023 15:01:27 +0100 Message-Id: <20230227140213.35084-71-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 154 +++++++++++++++++++++++----------------------- 1 file changed, 76 insertions(+), 78 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 93fc592161..9d6bb8312e 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -60,46 +60,46 @@ struct ohci_hcca { /* 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); + relative_frame_number = USUB(ohci->frame_number, starting_frame); 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 = iso_td.be; } - if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || - ((relative_frame_number < frame_count) && + 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_offset); return 1; @@ -1118,7 +1118,7 @@ static int ohci_service_ed_list(OHCIState *ohci, uint32_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)!= 0, + OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S) != 0, (ed.flags & OHCI_ED_K) != 0, (ed.flags & OHCI_ED_F) != 0, OHCI_BM(ed.flags, ED_MPS)); @@ -1311,10 +1311,8 @@ static void ohci_port_power(OHCIState *ohci, int i, int p) if (p) { ohci->rhport[i].ctrl |= OHCI_PORT_PPS; } else { - ohci->rhport[i].ctrl &= ~(OHCI_PORT_PPS| - OHCI_PORT_CCS| - OHCI_PORT_PSS| - OHCI_PORT_PRS); + ohci->rhport[i].ctrl &= ~(OHCI_PORT_PPS | OHCI_PORT_CCS | + OHCI_PORT_PSS | OHCI_PORT_PRS); } } @@ -1858,7 +1856,7 @@ void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, ohci->num_ports = num_ports; if (masterbus) { USBPort *ports[OHCI_MAX_PORTS]; - for(i = 0; i < num_ports; i++) { + for (i = 0; i < num_ports; i++) { ports[i] = &ohci->rhport[i].port; } usb_register_companion(masterbus, ports, num_ports,