Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-22 Thread Phillip Potter
On Sun, Oct 21, 2018 at 02:02:57PM +0300, Amir Goldstein wrote: > Yes. If you are looking for a cleanup task, you can > apply relevant patches from my series, starting with: > https://patchwork.kernel.org/patch/9481237/ > (Leave the xfs patch [11/11] out) > > But besides verifying that patches

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-22 Thread Phillip Potter
On Sun, Oct 21, 2018 at 02:02:57PM +0300, Amir Goldstein wrote: > Yes. If you are looking for a cleanup task, you can > apply relevant patches from my series, starting with: > https://patchwork.kernel.org/patch/9481237/ > (Leave the xfs patch [11/11] out) > > But besides verifying that patches

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-21 Thread Amir Goldstein
On Sun, Oct 21, 2018 at 12:57 PM Phillip Potter wrote: > > On Sun, Oct 21, 2018 at 08:30:35AM +0300, Amir Goldstein wrote: > > On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > > > > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > > > Remove switch statement from

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-21 Thread Amir Goldstein
On Sun, Oct 21, 2018 at 12:57 PM Phillip Potter wrote: > > On Sun, Oct 21, 2018 at 08:30:35AM +0300, Amir Goldstein wrote: > > On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > > > > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > > > Remove switch statement from

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-21 Thread Phillip Potter
On Sun, Oct 21, 2018 at 08:30:35AM +0300, Amir Goldstein wrote: > On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > > header and replace

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-21 Thread Phillip Potter
On Sun, Oct 21, 2018 at 08:30:35AM +0300, Amir Goldstein wrote: > On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > > header and replace

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Amir Goldstein
On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to DT_x, so

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Amir Goldstein
On Sun, Oct 21, 2018 at 1:27 AM Matthew Wilcox wrote: > > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to DT_x, so

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Al Viro
On Sat, Oct 20, 2018 at 03:26:37PM -0700, Matthew Wilcox wrote: > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Al Viro
On Sat, Oct 20, 2018 at 03:26:37PM -0700, Matthew Wilcox wrote: > On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Matthew Wilcox
On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > header and replace with simple assignment. For each case, S_IFx >> 12 > is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give > us the correct

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Matthew Wilcox
On Sat, Oct 20, 2018 at 11:09:57PM +0100, Phillip Potter wrote: > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > header and replace with simple assignment. For each case, S_IFx >> 12 > is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give > us the correct

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. It is expected that for *nix compatibility reasons, the

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-20 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. It is expected that for *nix compatibility reasons, the

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-18 Thread Phillip Potter
On Thu, Oct 18, 2018 at 12:33:05AM +0100, Al Viro wrote: > They are. BSD folks had (sanely, IMO) put the 'type' bits of st_mode > into directory entry verbatim. Again, "symbolic constant" != "can be > expected to change"... If, e.g., some port decides to change S_IFIFO, > they'll have no end of

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-18 Thread Phillip Potter
On Thu, Oct 18, 2018 at 12:33:05AM +0100, Al Viro wrote: > They are. BSD folks had (sanely, IMO) put the 'type' bits of st_mode > into directory entry verbatim. Again, "symbolic constant" != "can be > expected to change"... If, e.g., some port decides to change S_IFIFO, > they'll have no end of

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Al Viro
On Wed, Oct 17, 2018 at 10:11:47AM +, David Laight wrote: > From: Phillip Potter > > Sent: 17 October 2018 11:08 > > > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to DT_x, so in

Re: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Al Viro
On Wed, Oct 17, 2018 at 10:11:47AM +, David Laight wrote: > From: Phillip Potter > > Sent: 17 October 2018 11:08 > > > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > > header and replace with simple assignment. For each case, S_IFx >> 12 > > is equal to DT_x, so in

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. This is verified at compile-time with BUILD_BUG_ON macro

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. This is verified at compile-time with BUILD_BUG_ON macro

RE: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread David Laight
From: Phillip Potter > Sent: 17 October 2018 11:08 > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > header and replace with simple assignment. For each case, S_IFx >> 12 > is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give > us the correct file type.

RE: [PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread David Laight
From: Phillip Potter > Sent: 17 October 2018 11:08 > > Remove switch statement from ufs_set_de_type function in fs/ufs/util.h > header and replace with simple assignment. For each case, S_IFx >> 12 > is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give > us the correct file type.

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-17 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-09 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-09 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-02 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this

[PATCH] fs: ufs: Remove switch statement from ufs_set_de_type function

2018-10-02 Thread Phillip Potter
Remove switch statement from ufs_set_de_type function in fs/ufs/util.h header and replace with simple assignment. For each case, S_IFx >> 12 is equal to DT_x, so in valid cases (mode & S_IFMT) >> 12 should give us the correct file type. For invalid cases, upper layer validation catches this