ethosu: use FALLTHROUGH macro in ethosu_emit_operation_accesses
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Compiling with clang produces a -Wimplicit-fallthrough warning:

  src/gallium/drivers/ethosu/ethosu_cmd.c:1032:7: warning: unannotated
  fall-through between switch labels [-Wimplicit-fallthrough]

The plain "/* fall-through */" comment is not recognized by clang as a
fall-through annotation, so the intentional fall-through from the
ETHOSU_OPERATION_TYPE_CONVOLUTION case into the default case is flagged.
Replace the comment with the FALLTHROUGH macro, which expands to the
appropriate attribute and documents the intent for both GCC and clang.

Fixes: dce4b0313a ("ethosu: Add reshape operation")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42069>
This commit is contained in:
Vinson Lee 2026-06-06 20:27:29 -07:00 committed by Marge Bot
parent b33635bbe7
commit 718236ebb8

View file

@ -1028,7 +1028,7 @@ fill_memory_accesses(struct ethosu_subgraph *subgraph)
operation->read_accesses[3].region = operation->conv.weights.region;
operation->read_accesses[3].address = operation->conv.weights.address;
operation->read_accesses[3].size = operation->conv.weights.size;
/* fall-through */
FALLTHROUGH;
default:
operation->read_accesses[0].region = IO_REGION;
operation->read_accesses[0].address = operation->ifm.tiles.addresses[0];