Re: [PATCH] erofs: silence warnings related to impossible m_plen

From: Chao Yu
Date: Fri Mar 11 2022 - 03:24:14 EST


On 2022/3/11 1:34, Gao Xiang wrote:
Dan reported two smatch warnings [1],
.. warn: should '1 << lclusterbits' be a 64 bit type?
.. warn: should 'm->compressedlcs << lclusterbits' be a 64 bit type?

In practice, m_plen cannot be more than 1MiB due to on-disk constraint
for the compression mode, so we're always safe here.

In order to make static analyzers happy and don't report again,
let's silence them instead.

[1] https://lore.kernel.org/r/202203091002.lJVzsX6e-lkp@xxxxxxxxx

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,