All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matt Turner <mattst88@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, Magnus Lindholm <linmag7@gmail.com>
Subject: [lindholm-alpha:for-next 25/25] arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:392:28: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Wed, 23 Sep 2026 19:43:12 +0800	[thread overview]
Message-ID: <202609231955.2FkT2KAq-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha.git for-next
head:   33465f6ab697abceafd9a340067a544d551c4412
commit: 33465f6ab697abceafd9a340067a544d551c4412 [25/25] alpha: support the remaining kernel compression formats
config: alpha-randconfig-r1305-20260923 (https://download.01.org/0day-ci/archive/20260923/202609231955.2FkT2KAq-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260923/202609231955.2FkT2KAq-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609231955.2FkT2KAq-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   arch/alpha/boot/compressed/misc.c: note: in included file (through arch/alpha/boot/compressed/../../../../lib/decompress_unxz.c):
>> arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:392:28: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __le32 const [usertype] *p @@     got unsigned int const [usertype] * @@
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:392:28: sparse:     expected restricted __le32 const [usertype] *p
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:392:28: sparse:     got unsigned int const [usertype] *
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:426:48: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __le32 const [usertype] *p @@     got unsigned int const [usertype] * @@
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:426:48: sparse:     expected restricted __le32 const [usertype] *p
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:426:48: sparse:     got unsigned int const [usertype] *
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:434:37: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __le32 const [usertype] *p @@     got unsigned int const [usertype] * @@
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:434:37: sparse:     expected restricted __le32 const [usertype] *p
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:434:37: sparse:     got unsigned int const [usertype] *
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:458:28: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __le32 const [usertype] *p @@     got unsigned int const [usertype] * @@
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:458:28: sparse:     expected restricted __le32 const [usertype] *p
   arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c:458:28: sparse:     got unsigned int const [usertype] *

vim +392 arch/alpha/boot/compressed/../../../../lib/xz/xz_dec_stream.c

24fa0402a9b6a53 Lasse Collin 2011-01-12  384  
24fa0402a9b6a53 Lasse Collin 2011-01-12  385  /* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */
24fa0402a9b6a53 Lasse Collin 2011-01-12  386  static enum xz_ret dec_stream_header(struct xz_dec *s)
24fa0402a9b6a53 Lasse Collin 2011-01-12  387  {
24fa0402a9b6a53 Lasse Collin 2011-01-12  388  	if (!memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
24fa0402a9b6a53 Lasse Collin 2011-01-12  389  		return XZ_FORMAT_ERROR;
24fa0402a9b6a53 Lasse Collin 2011-01-12  390  
24fa0402a9b6a53 Lasse Collin 2011-01-12  391  	if (xz_crc32(s->temp.buf + HEADER_MAGIC_SIZE, 2, 0)
24fa0402a9b6a53 Lasse Collin 2011-01-12 @392  			!= get_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2))
24fa0402a9b6a53 Lasse Collin 2011-01-12  393  		return XZ_DATA_ERROR;
24fa0402a9b6a53 Lasse Collin 2011-01-12  394  
24fa0402a9b6a53 Lasse Collin 2011-01-12  395  	if (s->temp.buf[HEADER_MAGIC_SIZE] != 0)
24fa0402a9b6a53 Lasse Collin 2011-01-12  396  		return XZ_OPTIONS_ERROR;
24fa0402a9b6a53 Lasse Collin 2011-01-12  397  
24fa0402a9b6a53 Lasse Collin 2011-01-12  398  	/*
24fa0402a9b6a53 Lasse Collin 2011-01-12  399  	 * Of integrity checks, we support only none (Check ID = 0) and
24fa0402a9b6a53 Lasse Collin 2011-01-12  400  	 * CRC32 (Check ID = 1). However, if XZ_DEC_ANY_CHECK is defined,
24fa0402a9b6a53 Lasse Collin 2011-01-12  401  	 * we will accept other check types too, but then the check won't
24fa0402a9b6a53 Lasse Collin 2011-01-12  402  	 * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given.
24fa0402a9b6a53 Lasse Collin 2011-01-12  403  	 */
4f8d7abaa413c34 Lasse Collin 2021-10-11  404  	if (s->temp.buf[HEADER_MAGIC_SIZE + 1] > XZ_CHECK_MAX)
4f8d7abaa413c34 Lasse Collin 2021-10-11  405  		return XZ_OPTIONS_ERROR;
4f8d7abaa413c34 Lasse Collin 2021-10-11  406  
24fa0402a9b6a53 Lasse Collin 2011-01-12  407  	s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1];
24fa0402a9b6a53 Lasse Collin 2011-01-12  408  

:::::: The code at line 392 was first introduced by commit
:::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decompressor module

:::::: TO: Lasse Collin <lasse.collin@tukaani.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-09-23 11:44 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=202609231955.2FkT2KAq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linmag7@gmail.com \
    --cc=mattst88@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.