From patchwork Thu Feb 22 11:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 774846 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp715329wrw; Thu, 22 Feb 2024 03:29:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWpa6IW/XUxuHhExfquVG3OuSXXH6rqmv0vLOD/HD3CDAEWkxnAw773OQkIntR483o6F2wrjeROYi25vcYLr23i X-Google-Smtp-Source: AGHT+IGHGuqMG4QNp2f4JJ8Jymv3+Yqte2z47RmzxWFBRbTiYyvkD7e/1CMbiDUebX1i8l512rnA X-Received: by 2002:a0c:fb51:0:b0:68f:52e6:e59a with SMTP id b17-20020a0cfb51000000b0068f52e6e59amr3105406qvq.27.1708601341662; Thu, 22 Feb 2024 03:29:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708601341; cv=none; d=google.com; s=arc-20160816; b=T1Rw4cScfoEAmpeMsqMEd0LX2oQ9CHN+77ZOYHMg5x18bNH2o/gWb0Z8Gn4+xjyema tdBdMnE5kh2N7h0GK+aVZJFK5XD+yAHIjzhgQOm8sKGjHDhH9RxR5ONz9jxzMxooNLv/ b++BC+n359Z7K03imqztvjYBYm6qix9r8hADweeweKhIqEDJrbJ+tqU5KVzutyp+qxst +ZPoM3yHN2X3BvkoxlflVLUmtCnBHx12of3pfgw1fSy/9eSKTQ/gIprgdx9k3/QcCGOG M0Wj9N6MumiNtIEPFc75yn4uMs/QbOkeqVKpAu13uzboG7se9R1fWj11Y8r3dTHJGzYB lA9g== 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:cc:to :from; bh=co1NGhzmOvdt45RKPI29br3iTmYE75LYhFXzmPjJ8wI=; fh=IMXbw0xx+6Q/2UEl1nyvDi1qBBGGml6rPCVUBtTSKyg=; b=m3Sh2+bCK5B4kssFMucMv9kjslNfgHdx/CEp7nQm/+Ei7KokYd7HaxdfzoZENnOB6D V9hCckfgQv99RADZUx8wacaRdZTTOlThNca9P4pM//eiTh2CZlsjx0RkqFcga/TJn2V7 qKlP5FfxewctRfD8Abj4HSdn7o+22rkO28c+PX1nBBoDq5JNB+0+y7YuUVSDqHOviWmJ SZeJJdoaeVC0rIvIBV0DPIEm6TO+1EKqaarW0HXGLspDN48fJeXLt3/LzSUPtBRzGSli j1i1FBpopgrZPG1sJVIZLfZl7EYi2BFsC/+e8Z0wB2tYeUyDqG3W8uupMviZe7MjTJur 3LnA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i14-20020ad45c6e000000b0068f65c8e094si9422938qvh.299.2024.02.22.03.29.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Feb 2024 03:29:01 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rd7E5-0008Bt-6U; Thu, 22 Feb 2024 06:26:53 -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 1rd7DR-00083N-76; Thu, 22 Feb 2024 06:26:13 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rd7DK-0004p1-Tv; Thu, 22 Feb 2024 06:26:12 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 701CB4FB43; Thu, 22 Feb 2024 14:26:25 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id EB40A8716F; Thu, 22 Feb 2024 14:26:01 +0300 (MSK) Received: (nullmailer pid 2526143 invoked by uid 1000); Thu, 22 Feb 2024 11:26:01 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-trivial@nongnu.org, Michael Tokarev Subject: [PULL 01/34] hw/usb: Style cleanup Date: Thu, 22 Feb 2024 14:25:28 +0300 Message-Id: <20240222112601.2526057-2-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240222112601.2526057-1-mjt@tls.msk.ru> References: <20240222112601.2526057-1-mjt@tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 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: Philippe Mathieu-Daudé We are going to modify these lines, fix their style in order to avoid checkpatch.pl warning. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- hw/usb/hcd-ehci.c | 3 ++- hw/usb/hcd-uhci.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 870c72cb59..98a2860069 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1086,8 +1086,9 @@ static void ehci_opreg_write(void *ptr, hwaddr addr, case CONFIGFLAG: val &= 0x1; if (val) { - for(i = 0; i < NB_PORTS; i++) + for (i = 0; i < NB_PORTS; i++) { handle_port_owner_write(s, i, 0); + } } break; diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 7d3c026dae..b95b47f6a4 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -457,8 +457,9 @@ static void uhci_port_write(void *opaque, hwaddr addr, int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) + if (n >= NB_PORTS) { return; + } port = &s->ports[n]; dev = port->port.dev; if (dev && dev->attached) { @@ -513,8 +514,9 @@ static uint64_t uhci_port_read(void *opaque, hwaddr addr, unsigned size) UHCIPort *port; int n; n = (addr >> 1) & 7; - if (n >= NB_PORTS) + if (n >= NB_PORTS) { goto read_default; + } port = &s->ports[n]; val = port->ctrl; }