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

2020-11-24 Thread David Howells
Joe Perches 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?

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

2020-11-23 Thread Joe Perches
On Mon, 2020-11-23 at 16:10 +, David Howells wrote: > Joe Perches wrote: > > > >   call->unmarshall++; > > > + > > > + fallthrough; > > > > My preference would be to change these to break and not fallthrough; > > > > >   case 5: > > >   break; > > >   } > > My prefe

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

2020-11-23 Thread David Howells
Joe Perches wrote: > >   call->unmarshall++; > > + > > + fallthrough; > > My preference would be to change these to break and not fallthrough; > > >   case 5: > >   break; > >   } My preference would be to fall through. The case number is the state machine st

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

2020-11-20 Thread Gustavo A. R. Silva
On 11/20/20 17:18, Joe Perches wrote: > My preference would be to change these to break and not fallthrough; And my preference is fallthrough. Joe, please, let the maintainer share their opinion on this first. Thanks -- Gustavo

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

2020-11-20 Thread Joe Perches
On Fri, 2020-11-20 at 17:28 -0600, Gustavo A. R. Silva wrote: > On 11/20/20 17:18, Joe Perches wrote: > > > My preference would be to change these to break and not fallthrough; > > And my preference is fallthrough. If so, that's an unusual choice here as it seems most or all of the other patches

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

2020-11-20 Thread Joe Perches
On Fri, 2020-11-20 at 12:23 -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding multiple fallthrough pseudo-keywords > in places where the code is intended to fall through to the next > case. This is the first

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

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keywords in places where the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva ---