GCC correctly warns that two bit wide compr_type can't
exceed or be equal to UBIFS_COMPR_TYPES_CNT (== 4).

Remove the check. The check is there in the kernel as well,
but the warning is disabled there.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 fs/ubifs/super.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index b48e21fae636..6a0074bd1a5c 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -86,11 +86,6 @@ static int validate_inode(struct ubifs_info *c, const struct 
inode *inode)
                return 1;
        }
 
-       if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) {
-               ubifs_err(c, "unknown compression type %d", ui->compr_type);
-               return 2;
-       }
-
        if (ui->xattr_names + ui->xattr_cnt > XATTR_LIST_MAX)
                return 3;
 
-- 
2.30.2


Reply via email to