diff options
| author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2025-09-09 04:18:02 +0000 |
|---|---|---|
| committer | Kevin O'Connor <kevin@koconnor.net> | 2026-01-20 12:30:51 -0500 |
| commit | 106549a4362f6b499da522f8f8f5ed9f98388f87 (patch) | |
| tree | 7e5b77b57ef4d8708a0e599e17cb2340d766c2a4 | |
| parent | a5224f56b968d17204a42d288b58fcf88989e3f8 (diff) | |
| download | seabios-master.zip seabios-master.tar.gz seabios-master.tar.bz2 | |
Correct the logical condition in the start_ohci function to ensure
proper evaluation of the status variable.
Fix warning:
./src/hw/usb-ohci.c:192:13: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
192 | if (! status & OHCI_HCR)
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
| -rw-r--r-- | src/hw/usb-ohci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hw/usb-ohci.c b/src/hw/usb-ohci.c index 90f60e6..0fe8ea9 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 *hcca) writel(&cntl->regs->cmdstatus, OHCI_HCR); for (;;) { u32 status = readl(&cntl->regs->cmdstatus); - if (! status & OHCI_HCR) + if (!(status & OHCI_HCR)) break; if (timer_check(end)) { warn_timeout(); |
