All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [f2fs-stable:linux-5.4.y 175/304] fs/f2fs/compress.c:433 zstd_decompress_pages() warn: should '((1) << 12) << dic->log_cluster_size' be a 64 bit
Date: Tue, 11 Aug 2020 18:13:11 +0800	[thread overview]
Message-ID: <202008111810.f76nOTkm%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git linux-5.4.y
head:   32f28e611d66c134f14ab2a9c4e825899360185c
commit: 6a881d4790ecb0b526712a358073a364ca67d95b [175/304] f2fs: compress: support zstd compress algorithm
config: i386-randconfig-m021-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

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

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

vim +433 fs/f2fs/compress.c

   408	
   409	static int zstd_decompress_pages(struct decompress_io_ctx *dic)
   410	{
   411		ZSTD_DStream *stream = dic->private2;
   412		ZSTD_inBuffer inbuf;
   413		ZSTD_outBuffer outbuf;
   414		int ret;
   415	
   416		inbuf.pos = 0;
   417		inbuf.src = dic->cbuf->cdata;
   418		inbuf.size = dic->clen;
   419	
   420		outbuf.pos = 0;
   421		outbuf.dst = dic->rbuf;
   422		outbuf.size = dic->rlen;
   423	
   424		ret = ZSTD_decompressStream(stream, &outbuf, &inbuf);
   425		if (ZSTD_isError(ret)) {
   426			printk_ratelimited("%sF2FS-fs (%s): %s ZSTD_compressStream failed, ret: %d\n",
   427					KERN_ERR, F2FS_I_SB(dic->inode)->sb->s_id,
   428					__func__, ZSTD_getErrorCode(ret));
   429			return -EIO;
   430		}
   431	
   432		if (dic->rlen != outbuf.pos) {
 > 433			printk_ratelimited("%sF2FS-fs (%s): %s ZSTD invalid rlen:%zu, "
   434					"expected:%lu\n", KERN_ERR,
   435					F2FS_I_SB(dic->inode)->sb->s_id,
   436					__func__, dic->rlen,
   437					PAGE_SIZE << dic->log_cluster_size);
   438			return -EIO;
   439		}
   440	
   441		return 0;
   442	}
   443	

---
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: 28953 bytes --]

                 reply	other threads:[~2020-08-11 10:13 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=202008111810.f76nOTkm%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@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.