On Thu, Jun 23, 2022 at 12:45:21PM +0200, Uwe Kleine-König wrote: > Hello, > > On Mon, Feb 07, 2022 at 04:14:57PM +0100, Sascha Hauer wrote: > > zstd shows a good compression rate and is faster than lzo. This adds > > UBIFS support for it. > > > > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> > > This patch is part of 2022.03.0 with commit cd1610d8ab30 ("ubifs: Add > zstd support") > > Since then there is a warning in my imx builds (using imx_defconfig): > > CC fs/ubifs/super.o > fs/ubifs/super.c: In function ‘validate_inode’: > fs/ubifs/super.c:89:28: warning: comparison is always false due to limited range of data type [-Wtype-limits] > 89 | if (ui->compr_type >= UBIFS_COMPR_TYPES_CNT) { > | ^~ > > That's because UBIFS_COMPR_TYPES_CNT is now 4 and ui->compr_type is an > unsigned int compr_type:2. Same here. > > I wonder if the check should just be dropped now that all bits are used, > but I don't feel confident enough to say that's the right thing to do. The code is the same in the Kernel, but the Kernel has -Wtype-limits disabled. I'd say we can remove this check. You could increase your kernel patch count by suggesting the same there. 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 |