All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: fs/f2fs/compress.c:276 lz4_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit
Date: Fri, 30 Oct 2020 11:39:52 +0800	[thread overview]
Message-ID: <202010301149.D7xiWIeY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2780 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
CC: Jaegeuk Kim <jaegeuk@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   07e0887302450a62f51dba72df6afb5fabb23d1c
commit: 4c8ff7095bef64fc47e996a938f7d57f9e077da3 f2fs: support data compression
date:   10 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
config: nios2-randconfig-m031-20201030 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/f2fs/compress.c:276 lz4_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit type?

Old smatch warnings:
fs/f2fs/compress.c:212 lzo_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit type?

vim +276 fs/f2fs/compress.c

4c8ff7095bef64f Chao Yu 2019-11-01  262  
4c8ff7095bef64f Chao Yu 2019-11-01  263  static int lz4_decompress_pages(struct decompress_io_ctx *dic)
4c8ff7095bef64f Chao Yu 2019-11-01  264  {
4c8ff7095bef64f Chao Yu 2019-11-01  265  	int ret;
4c8ff7095bef64f Chao Yu 2019-11-01  266  
4c8ff7095bef64f Chao Yu 2019-11-01  267  	ret = LZ4_decompress_safe(dic->cbuf->cdata, dic->rbuf,
4c8ff7095bef64f Chao Yu 2019-11-01  268  						dic->clen, dic->rlen);
4c8ff7095bef64f Chao Yu 2019-11-01  269  	if (ret < 0) {
4c8ff7095bef64f Chao Yu 2019-11-01  270  		printk_ratelimited("%sF2FS-fs (%s): lz4 decompress failed, ret:%d\n",
4c8ff7095bef64f Chao Yu 2019-11-01  271  				KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id, ret);
4c8ff7095bef64f Chao Yu 2019-11-01  272  		return -EIO;
4c8ff7095bef64f Chao Yu 2019-11-01  273  	}
4c8ff7095bef64f Chao Yu 2019-11-01  274  
4c8ff7095bef64f Chao Yu 2019-11-01  275  	if (ret != PAGE_SIZE << dic->log_cluster_size) {
4c8ff7095bef64f Chao Yu 2019-11-01 @276  		printk_ratelimited("%sF2FS-fs (%s): lz4 invalid rlen:%zu, "
4c8ff7095bef64f Chao Yu 2019-11-01  277  					"expected:%lu\n", KERN_ERR,
4c8ff7095bef64f Chao Yu 2019-11-01  278  					F2FS_I_SB(dic->inode)->sb->s_id,
4c8ff7095bef64f Chao Yu 2019-11-01  279  					dic->rlen,
4c8ff7095bef64f Chao Yu 2019-11-01  280  					PAGE_SIZE << dic->log_cluster_size);
4c8ff7095bef64f Chao Yu 2019-11-01  281  		return -EIO;
4c8ff7095bef64f Chao Yu 2019-11-01  282  	}
4c8ff7095bef64f Chao Yu 2019-11-01  283  	return 0;
4c8ff7095bef64f Chao Yu 2019-11-01  284  }
4c8ff7095bef64f Chao Yu 2019-11-01  285  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23095 bytes --]

                 reply	other threads:[~2020-10-30  3:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202010301149.D7xiWIeY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.