All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2020-08-11 10:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-11 10:13 UTC (permalink / raw)
  To: kbuild-all

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-11 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 10:13 [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 kernel test robot

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.