clang 14 doesn't properly determine that we're unconditionally returning
if we have ACPI but not FDT. Workaround it for now by just returning
earlier explicitly, but drop a comment noting that it's sketchy.
Details
Details
- Reviewers
manu andrew - Group Reviewers
arm64 - Commits
- rG4a4ad02da3c8: uart: uart_cpu_arm64: fix the build without FDT
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Maybe we should create a new function that calls uart_cpu_fdt_probe and sets up di similar to uart_cpu_acpi_spcr. This will mean the code is
#if DEV_ACPI if (uart_cpu_acpi_spcr(...) == 0) return (0); #endif #if FDT if (uart_new_fdt_func(...) == 0) return (0); #endif return (ENXIO);
Comment Actions
Switch to Andy's idea; do fdt setup in a new function entirely, just return
ENXIO if neither setup succeeds.