erofs: silence warnings related to impossible m_plen
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 10 Mar 2022 17:34:48 +0000 (01:34 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 16 Mar 2022 01:39:07 +0000 (09:39 +0800)
commitd467e980d0239fd95cc93b0995199973624a4825
treec486092bdf4b36f8f1a6afde155a93d0fc3f0325
parentfaac509507e2341093c32b6607a82430bccfb78f
erofs: silence warnings related to impossible m_plen

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 not report again, let's
silence them instead.

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

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20220310173448.19962-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/zmap.c