Re: [PATCH 001/141] afs: Fix fall-through warnings for Clang

From: David Howells
Date: Tue Nov 24 2020 - 08:21:38 EST


Joe Perches <joe@xxxxxxxxxxx> wrote:

> > My preference would be to fall through. The case number is the state machine
> > state, as indexed by call->unmarshall.
>
> Then ideally the state machine states should be enums and not numbers
> and the compiler should use a default block for unhandled states right?
>
> Is code like call->marshall++ a common style for kernel state machines?
> Perhaps not.

How the value is interpreted is unique to each delivery function, of which
there are a number, since it counts out the separate parts of the xdr encoding
for that particular RPC request or reply block.

Maybe "state machine" isn't the right term.

David