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: 657095 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385180wrb; Mon, 27 Feb 2023 06:36:13 -0800 (PST) X-Google-Smtp-Source: AK7set/VhmvQ6XFfvLT4rPl9ep6yEp7VtNWflQrwbijcSQvYHfJGOtjkxQBc4BBkqpon/lTLFKHt X-Received: by 2002:ad4:5aec:0:b0:56e:a791:37c6 with SMTP id c12-20020ad45aec000000b0056ea79137c6mr47923312qvh.16.1677508573306; Mon, 27 Feb 2023 06:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508573; cv=none; d=google.com; s=arc-20160816; b=HlyBuc8lmoVYgGGZTWQZOcNiyW5I0hkabAycU+KAiJpDcfjhPi57sGOQ/sqzWW7mJP gY0nEsn1qjCC+wcQ9ZMmJxMYDQamsuTqBwROkFURbPdWyYPiXeucI1rpFnXJxnRRiGOR xijsB1EERVmBsQNdZYoDPbATDdgk2eUAqIegTBeZUOFUdXyX3Ra80uweBTm2unAYyDA1 dGd38tp5FUgUWB52nORk/YMzc5DG394LXxd+rMKx2v5NxRAVYlNtPsh6yEyQKPYRY8/c DhvfgkQFyVZ2L8D9B2huZghmMQY9TPlgqBynSZbyKEuzV5a80RupPulj5aSMxuos+BcM fQAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=HCXI+0H2Pu8Rrqy2HsRdWPJcXWO3qL+iBCaJN/6c90to9lDdTRelyFtv9v2V2F2MUa WfZkcPfOIAixchB9bMUGzvDK75jCqxUgPUhFj6yWGCIHF8dh/s6MxcZgfo2vswmIfTpH +GkFS3VBkBb6uKcRb3YIIxP+WHnyrb9ScIjrLIbqEA02G07snNFI3hKRs+FFWF/kuVoT cS7W723kop/4/y+b8DmXvAf3PvVhSreWBfb8hwiLZUPyuRzNGmU+fUEB0CxF18qESWcR 1nrcHd2ChUdIcZbx3Qf6+9fz00pxLxQOf3i+2WmDx6dgeC398pKcOsM5BB6z7OOLV3DS IIFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L6n1DOx7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bn40-20020a05620a2ae800b0073b9e5fb99esi6056727qkb.105.2023.02.27.06.36.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L6n1DOx7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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,