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 f

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

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

2018-10-01 Thread Phillip Potter
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. Signed-off-by: Phillip Potter --- diff --git a/fs/ufs/util.h b/fs/ufs/util.h index 1907be6d5808..1edf4c6454e3 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h @@ -155,37 +

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

2018-04-03 Thread Phillip Potter
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. Signed-off-by: Phillip Potter --- fs/ufs/util.h | 50 ++ 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a

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

2018-03-18 Thread Phillip Potter
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. Signed-off-by: Phillip Potter --- fs/ufs/util.h | 50 ++ 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a