Re: [PATCH] fs: ufs: Convert ufs_set_de_type to use lookup table

2018-10-02 Thread Phillip Potter
On Tue, Oct 02, 2018 at 03:28:14AM +0100, Al Viro wrote: > On Mon, Oct 01, 2018 at 04:33:10PM +0100, Phillip Potter wrote: > > Modify ufs_set_de_type function in fs/ufs/util.h to use a lookup > > table rather than a switch statement, as per the TODO comment. > > Brittle, that... Something like

Re: [PATCH] fs: ufs: Convert ufs_set_de_type to use lookup table

2018-10-02 Thread Phillip Potter
On Tue, Oct 02, 2018 at 03:28:14AM +0100, Al Viro wrote: > On Mon, Oct 01, 2018 at 04:33:10PM +0100, Phillip Potter wrote: > > Modify ufs_set_de_type function in fs/ufs/util.h to use a lookup > > table rather than a switch statement, as per the TODO comment. > > Brittle, that... Something like

Re: [PATCH] fs: ufs: Convert ufs_set_de_type to use lookup table

2018-10-01 Thread Al Viro
On Mon, Oct 01, 2018 at 04:33:10PM +0100, Phillip Potter wrote: > Modify ufs_set_de_type function in fs/ufs/util.h to use a lookup > table rather than a switch statement, as per the TODO comment. Brittle, that... Something like fs/ext2/dir.c approach (that is, #define S_SHIFT 12 static unsigned

Re: [PATCH] fs: ufs: Convert ufs_set_de_type to use lookup table

2018-10-01 Thread Al Viro
On Mon, Oct 01, 2018 at 04:33:10PM +0100, Phillip Potter wrote: > Modify ufs_set_de_type function in fs/ufs/util.h to use a lookup > table rather than a switch statement, as per the TODO comment. Brittle, that... Something like fs/ext2/dir.c approach (that is, #define S_SHIFT 12 static unsigned