acpid: fix extra closing brace in getdents match

In drivers/acpid/src/scheme.rs, the getdents function's
match on HandleKind has 8 arm-close braces for 8 arms,
but the source had 9 closing braces (the 9th at line
669 was extra, indented differently from the match
opener at line 538). Rust's parser couldn't match
them up:

  error: unexpected closing delimiter: '}'
  note: this delimiter might not be properly closed...
  note: ...as it matches this but it has different indentation

The extra brace was at line 669, immediately after the
HandleKind::ProcFile | DmiDir arm body, before the '_'
wildcard. Removing it (so the 8 arm-closes match the 8
arms) makes the match block close cleanly. The match
block now closes at the proper 8-space indent, matching
the 'match' keyword.

This is a pre-existing bug in the Phase II.X.W commit
'dcd70a1 acpid: Phase II.X.W S3 wake handling + kstop_enter_s3 helper'.
The brace was probably added by mistake during one of
the Phase II.X.W edits. The Phase II.X.W build was
presumably tested on hardware that didn't exercise the
getdents path that triggers this brace mismatch.

Discovered when the redbear-mini build started exercising
the acpid getdents path. Fix: delete the extra brace.
This commit is contained in:
2026-07-02 11:37:53 +03:00
parent dcd70a1255
commit a3b8a34d9c
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -666,7 +666,6 @@ impl SchemeSync for AcpiScheme<'_, '_> {
// No children; reads/writes go through the
// HandleKind match in kread/kwriteoff.
}
}
_ => return Err(Error::new(EIO)),
}