Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177582469
D36788.1794796610.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
931 B
Referenced Files
None
Subscribers
None
D36788.1794796610.diff
View Options
diff --git a/sys/dev/uart/uart_cpu_arm64.c b/sys/dev/uart/uart_cpu_arm64.c
--- a/sys/dev/uart/uart_cpu_arm64.c
+++ b/sys/dev/uart/uart_cpu_arm64.c
@@ -94,18 +94,28 @@
if (err == 0)
return (0);
+ err = ENXIO;
#ifdef DEV_ACPI
/* Check if SPCR can tell us what console to use. */
if (uart_cpu_acpi_spcr(devtype, di) == 0)
return (0);
-#endif
- err = ENXIO;
+#ifndef FDT
+ /*
+ * In an ideal world, we'd just fall through and bail out because FDT
+ * isn't defined, thus `err` doesn't get reassigned and we immediately
+ * return. As of clang 14, later uses of `shift`, et al., raise
+ * warnings because it can't deduce that we're about to return.
+ */
+ else
+ return (ENXIO);
+#endif /* !FDT */
+#endif /* DEV_ACPI */
#ifdef FDT
if (err != 0) {
err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk,
&shift, &iowidth, devtype);
}
-#endif
+#endif /* FDT */
if (err != 0)
return (err);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 2:36 AM (18 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41756135
Default Alt Text
D36788.1794796610.diff (931 B)
Attached To
Mode
D36788: uart: uart_cpu_arm64: fix the build without FDT
Attached
Detach File
Event Timeline