mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, ukl@pengutronix.de
Subject: Re: [PATCH] fs: ubifs: remove always-false check
Date: Tue, 13 Sep 2022 10:37:51 +0200	[thread overview]
Message-ID: <20220913083751.GE12909@pengutronix.de> (raw)
In-Reply-To: <20220811135804.271071-1-a.fatoum@pengutronix.de>

On Thu, Aug 11, 2022 at 03:58:04PM +0200, Ahmad Fatoum wrote:
> 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 <a.fatoum@pengutronix.de>
> ---
>  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;
> -	}
> -

Although Richard decided for the Kernel to keep the check I decided to
take this patch for barebox. The warning is annoying and doesn't tell us
anything. Once this is solved in the Kernel we'll get the solution with
the next UBIFS sync.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  parent reply	other threads:[~2022-09-13  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 13:58 Ahmad Fatoum
2022-08-11 16:29 ` Uwe Kleine-König
2022-09-13  8:37 ` Sascha Hauer [this message]
2022-09-13  8:47   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220913083751.GE12909@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ukl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox