From nobody Sun Sep 21 23:20:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1756882461988545.738824497927; Tue, 2 Sep 2025 23:54:21 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 82AD14C400; Wed, 3 Sep 2025 06:54:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) by coreboot.org (Postfix) with ESMTP id 2C7CA403A2 for ; Wed, 3 Sep 2025 06:51:45 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailfhigh.phl.internal (Postfix) with ESMTP id 464111400382; Wed, 3 Sep 2025 02:51:44 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-06.internal (MEProxy); Wed, 03 Sep 2025 02:51:44 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 3 Sep 2025 02:51:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1756882304; x=1756968704; bh=8KU3/KdQ6HJfYc0VUoQJQQiRsQvW7tPz+F7Eu2rITaw=; b= eeVTO9MdcO8VTYGDywRxjrVXd55Pe1ZYK1CkN5H/nl35NufXOzHjMUnk7xzrmY0u 8Krqo5NAgCQ+aFsTG3jKVfsLLETYvs6kv3nR+zt5SsIneZBh689K75mRuuwQ0E+y z/GLdmgX56j3P78m+88SB7zHMMcifaaG5RB0K42tJkljhcY0U7tcsL0/VnawvEx4 faV/PoR5ltVbWEZ+7D0QhfyuQGhBTZsekraqxgk85jKtTKiJ+FhPiwd4g8IZqnwL vihyy9Xsa4XgH4WDlcUBKaS+yPdd7A/gN+PwJnlmFKOh71w/wtM1zQ0PqxsqYkrb pU4jKTFZBmUkp1UQJdU43A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1756882304; x= 1756968704; bh=8KU3/KdQ6HJfYc0VUoQJQQiRsQvW7tPz+F7Eu2rITaw=; b=P C3YlmtJ9Dp3ZxTC8yqkaq5LKFGHb53yBjy/fcEvaF10vhGe6X5dez247VBkzRavz GAkXrTn5hIBlwSg/mGRDuGYxxXLBt1+z4eeYxnlxMAA395Z66PTT4cR7hTBpteJf fxZ3DmSvhTyuFDikzAxOdz3B/CWSh9xxHqlMrQrag1MfWulPTKKOyC1M7T7powzO 3HSrmfrw1Win2IIqhVHzr4B+u2rAw04sfhaHK2EUZ7oRYSOrqiJgkXlvDkJpIl9j K5JjD/VXovQ0dKWF4e8+dbCxdMVYOxkUFbBvnQdyfDiqV7zADjMBUsE7wnSguvZU MaFr8aNfFBupG7rLPKLXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtre dtjeenucfhrhhomheplfhirgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhmqeenucggtffrrghtthgvrhhnpedvkeeihfefveekueevteefle ffkeegudeghfdtuddugefhueevgeffgedukeejleenucevlhhushhtvghrufhiiigvpedv necurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorg htrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphht thhopehsvggrsghiohhssehsvggrsghiohhsrdhorhhgpdhrtghpthhtohepjhhirgiguh hnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Wed, 03 Sep 2025 06:51:30 +0000 MIME-Version: 1.0 Message-Id: <20250903-build-v2-9-8e8916974f9c@flygoat.com> References: <20250903-build-v2-0-8e8916974f9c@flygoat.com> In-Reply-To: <20250903-build-v2-0-8e8916974f9c@flygoat.com> To: seabios@seabios.org Message-ID-Hash: QSFCBIJB2LGCWG2LXRMNLAYWCMBYYNAJ X-Message-ID-Hash: QSFCBIJB2LGCWG2LXRMNLAYWCMBYYNAJ X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH v2 9/9] usb-ohci: Fix logical condition in start_ohci function List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZohoMail-DKIM: fail (found 2 invalid signatures) X-ZM-MESSAGEID: 1756882463889116600 Content-Type: text/plain; charset="utf-8" Corrected the logical condition in the start_ohci function to ensure proper= evaluation of the status variable. This change prevents potential misinter= pretation of the command status register. Fix warning: ./src/hw/usb-ohci.c:192:13: warning: logical not is only applied to the lef= t hand side of this bitwise operator [-Wlogical-not-parentheses] 192 | if (! status & OHCI_HCR) Signed-off-by: Jiaxun Yang Reviewed-by: Paul Menzel --- src/hw/usb-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw/usb-ohci.c b/src/hw/usb-ohci.c index 90f60e6452957552412d2aa9958f00141473437a..0fe8ea9e5d36468516e60830510= 4da1e2129be70 100644 --- a/src/hw/usb-ohci.c +++ b/src/hw/usb-ohci.c @@ -189,7 +189,7 @@ start_ohci(struct usb_ohci_s *cntl, struct ohci_hcca *h= cca) writel(&cntl->regs->cmdstatus, OHCI_HCR); for (;;) { u32 status =3D readl(&cntl->regs->cmdstatus); - if (! status & OHCI_HCR) + if (!(status & OHCI_HCR)) break; if (timer_check(end)) { warn_timeout(); --=20 2.43.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org