From patchwork Tue Feb 13 04:38:57 2024 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: 772258 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp89573wre; Mon, 12 Feb 2024 20:40:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV0mWwwmp78/GSYNlYwAlZ28yrNPYdS9JQQxJ8ppWQtiAGoIoEH3uWMDKnGKMBfV0OWIvy9nybpp0CmXBLZlC+o X-Google-Smtp-Source: AGHT+IHXWiqkD0DoehzbHFJWhvU471vNoOxKgah0eYbSHCy+qYHUt4NOqaR0zFnh7/Yak0Uiv5SI X-Received: by 2002:a05:620a:a49:b0:785:8b74:108c with SMTP id j9-20020a05620a0a4900b007858b74108cmr8697796qka.15.1707799204276; Mon, 12 Feb 2024 20:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707799204; cv=none; d=google.com; s=arc-20160816; b=XSzdzzsJbN47D/gQIkS8G+DFtwxnaiw3eGcgflkTkkK800Rx6cfEVynW06QKuZAQsM FGWCAWeoKi2F29+NgY6vUaOfkVUGTvPljrCLXR777t/UpdAOZAijXx+PF2mCHfAmwMKg r1Wou1UQymv+VmDJY4BgsAa+WztwycvLLkrLDboxeooC/GNG0QcbaS3nPn/VvkBy9/ZB AhBS1EafifZMtSYEzsur6nM2Hzft973hhemdqy4W0FyQvIgToXyPbwSR0ZB/gRG8oKOH zKo3yvP+w4xxh6kkT9IQURiJtq554icCf5eROx0wkJRH3692Oj8Etkau7upVg+xik86w yPRg== 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:dkim-signature; bh=o6pxcy83+qY+qqR1JfeBd83QWY3SHzfnMOli7CsxV1g=; fh=dL2J62bvOzNNndnrshua4qBrvcMdDcClHjAyDbkVXWU=; b=aaWM5yoTPpX511smYAiTaSXnPyIMg3+VvjsYCY/7IBUwj9rbDpTh6Xk+BehZvJswfk KJkqtfygoXPCqMuiLmQNWHA4pYmSBbmp5aAfR1u0OzU/Mp1cuisKJnT4V/YgjcLh4rcv WndngmXidt95iP18+TlDW6vUoEEd2F6orcftA5UaE4kcFM1rIVTqdd4oBnKbato5KBdU ikySgFr9NpVxdAboMvDHU/+7iOtEqM7WCAUl4JRlaEEXAA4DQot24BBWM60zVWetNWdP NHEU5/ZRgfQWPT8v6PBeh/OYrHweERlj4T7XES0G/CuvBnaS2YX4sgjOErC+MS8mN9OC jAhQ==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hl7fXCZX; 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 X-Forwarded-Encrypted: i=1; AJvYcCUcoQl2geglKeVeW5r1+fsLiF+Vu0yJkaPveaETlwb4C6L/ehc8wzCip+5JXXbGwkcFUzgLWtJ7yG/tqpkCWl1D Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q13-20020a05620a038d00b00785db64faa1si2488265qkm.672.2024.02.12.20.40.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2024 20:40:04 -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=hl7fXCZX; 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 1rZkZi-0008V5-85; Mon, 12 Feb 2024 23:39:18 -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 1rZkZd-0008SZ-Jq for qemu-devel@nongnu.org; Mon, 12 Feb 2024 23:39:14 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZkZa-0005zc-F9 for qemu-devel@nongnu.org; Mon, 12 Feb 2024 23:39:11 -0500 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2d107900457so3886111fa.1 for ; Mon, 12 Feb 2024 20:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707799147; x=1708403947; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o6pxcy83+qY+qqR1JfeBd83QWY3SHzfnMOli7CsxV1g=; b=hl7fXCZXi7maccqm24r5IDkfVPS5OZN0PVEKoLkD30rvSZLDxf4AKtd5oFNqs+wjEP 5zxqrS7fQdG3KjO4FLfL0Qsn1fcpnwx55ABx/qUuHw8A/WVzF0YfnvkN066J3Fxf0RT3 ewptUWYlfPB8Rs4VMhqk2mIrYolr5hfCC0rByUggs37qoTI7+obrjTQDlBBG85bhqFEr 1G37k80v1J7uRezQdcE+2ErRTGhm1GSfu4Mn4oepfv6dNSs+3qVT+YGFt7HO/lXLyc5E 7AfNm8UiMTTj4ZBslWM2ZQGL7wTbauvWc7cuPSdphW6oqjlBCx3l58At236ZtARSGlWp auFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707799147; x=1708403947; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o6pxcy83+qY+qqR1JfeBd83QWY3SHzfnMOli7CsxV1g=; b=kBGkgRva3yf9nGme/hcldu65fQjSICJKdB5B7fYD8NLLYnEwY4vq69U4V84wrHT9ST IY7tgNtJp2Z1tW7yipMBww/J7kz3d+35G9nG8Zu0CUGA5mHqz/NeayeTRZI1ZtGW47iM azde3zLrEzZ+h1yDhgcSooRqPPiXNUaxDH3AnEqkAlM2l7i8UJi7vge5h5VnqNJProo0 nl23aWSbYhUfIzVUXpDp1jop7XSTt/aLKOFQXl+kACM9cxHETzCNjBxNkZmCOGWZGqQd eG9rh7Ha2wZHSmz5+R99CSebgq4IiRkkqEv46FxMh7fOSikmrTZfrpuODN1KnmnccDzW kAOw== X-Gm-Message-State: AOJu0Yy/9wlUk91tMf8BB0wvqGopvt0ZEkfQepW/PgaM6HM520mvikkJ +wC5tHAKYOnZD+MGLEEW/ABcrmXZTBZZHUZboh+/7X9FqI7vN0UHM7A/xaqxZ+gW0o+wXj2uBhd 9 X-Received: by 2002:a05:651c:a12:b0:2d1:749:c85f with SMTP id k18-20020a05651c0a1200b002d10749c85fmr526820ljq.47.1707799146683; Mon, 12 Feb 2024 20:39:06 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWelYw+K+czkwcdHJjSKFRz8AzTHcxEzN5x7MjPxiZwA4JRoNdiQl8OQR9ApRI2okuGK/u6ji/kRMcoZak3PUW57zQPM0+ZsIzpNzAhMJP2kZ7wdzk= Received: from m1x-phil.lan ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id em8-20020a056402364800b00561740859b3sm3096177edb.19.2024.02.12.20.39.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 12 Feb 2024 20:39:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Gerd Hoffmann , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/3] hw/usb: Style cleanup Date: Tue, 13 Feb 2024 05:38:57 +0100 Message-ID: <20240213043859.61019-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240213043859.61019-1-philmd@linaro.org> References: <20240213043859.61019-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.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, T_SCC_BODY_TEXT_LINE=-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 We are going to modify these lines, fix their style in order to avoid checkpatch.pl warning. Signed-off-by: Philippe Mathieu-Daudé --- 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; }