[Linux-kernel-mentees] [PATCH RESEND] fs: cramfs_fs.h: Fix shifting signed 32-bit value by 31 bits problem

Christoph Hellwig hch at infradead.org
Tue Jun 18 06:59:20 UTC 2019


> -#define CRAMFS_BLK_FLAG_UNCOMPRESSED	(1 << 31)
> +#define CRAMFS_BLK_FLAG_UNCOMPRESSED	(1U << 31)
>  #define CRAMFS_BLK_FLAG_DIRECT_PTR	(1 << 30)

Please use the unsigned constants for all flags, not just one.


More information about the Linux-kernel-mentees mailing list