mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: avivdaum <aviv.daum@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>
Subject: fs/fat/fat_test.c:261:9: sparse: sparse: incorrect type in initializer (different base types)
Date: Tue, 02 Jun 2026 00:34:04 +0800	[thread overview]
Message-ID: <202606020036.nW4hUG3I-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e43ffb69e0438cddd72aaa30898b4dc446f664f8
commit: 4bbf3f58e00f8671eb384c7df6983d803058b204 fat: add KUnit tests for timestamp conversion helpers
date:   10 weeks ago
config: m68k-randconfig-r111-20260601 (https://download.01.org/0day-ci/archive/20260602/202606020036.nW4hUG3I-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260602/202606020036.nW4hUG3I-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
| Fixes: 4bbf3f58e00f ("fat: add KUnit tests for timestamp conversion helpers")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606020036.nW4hUG3I-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/fat/fat_test.c:261:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted __le16 const __left @@
   fs/fat/fat_test.c:261:9: sparse:     expected long long left_value
   fs/fat/fat_test.c:261:9: sparse:     got restricted __le16 const __left
   fs/fat/fat_test.c:261:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted __le16 const __right @@
   fs/fat/fat_test.c:261:9: sparse:     expected long long right_value
   fs/fat/fat_test.c:261:9: sparse:     got restricted __le16 const __right
   fs/fat/fat_test.c:265:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted __le16 const __left @@
   fs/fat/fat_test.c:265:9: sparse:     expected long long left_value
   fs/fat/fat_test.c:265:9: sparse:     got restricted __le16 const __left
   fs/fat/fat_test.c:265:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted __le16 const __right @@
   fs/fat/fat_test.c:265:9: sparse:     expected long long right_value
   fs/fat/fat_test.c:265:9: sparse:     got restricted __le16 const __right
   fs/fat/fat_test.c:286:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted __le16 const __left @@
   fs/fat/fat_test.c:286:9: sparse:     expected long long left_value
   fs/fat/fat_test.c:286:9: sparse:     got restricted __le16 const __left
   fs/fat/fat_test.c:286:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted __le16 const __right @@
   fs/fat/fat_test.c:286:9: sparse:     expected long long right_value
   fs/fat/fat_test.c:286:9: sparse:     got restricted __le16 const __right
   fs/fat/fat_test.c:290:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted __le16 const __left @@
   fs/fat/fat_test.c:290:9: sparse:     expected long long left_value
   fs/fat/fat_test.c:290:9: sparse:     got restricted __le16 const __left
   fs/fat/fat_test.c:290:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted __le16 const __right @@
   fs/fat/fat_test.c:290:9: sparse:     expected long long right_value
   fs/fat/fat_test.c:290:9: sparse:     got restricted __le16 const __right

vim +261 fs/fat/fat_test.c

b0d4adaf3b3c44 David Gow 2021-04-15  248  
b0d4adaf3b3c44 David Gow 2021-04-15  249  static void fat_time_unix2fat_test(struct kunit *test)
b0d4adaf3b3c44 David Gow 2021-04-15  250  {
b0d4adaf3b3c44 David Gow 2021-04-15  251  	static struct msdos_sb_info fake_sb;
b0d4adaf3b3c44 David Gow 2021-04-15  252  	__le16 date, time;
b0d4adaf3b3c44 David Gow 2021-04-15  253  	u8 cs;
b0d4adaf3b3c44 David Gow 2021-04-15  254  	struct fat_timestamp_testcase *testcase =
b0d4adaf3b3c44 David Gow 2021-04-15  255  		(struct fat_timestamp_testcase *)test->param_value;
b0d4adaf3b3c44 David Gow 2021-04-15  256  
4bbf3f58e00f86 avivdaum  2026-03-16  257  	fat_test_set_time_offset(&fake_sb, testcase->time_offset);
b0d4adaf3b3c44 David Gow 2021-04-15  258  
b0d4adaf3b3c44 David Gow 2021-04-15  259  	fat_time_unix2fat(&fake_sb, &testcase->ts,
b0d4adaf3b3c44 David Gow 2021-04-15  260  			  &time, &date, &cs);
b0d4adaf3b3c44 David Gow 2021-04-15 @261  	KUNIT_EXPECT_EQ_MSG(test,
4bbf3f58e00f86 avivdaum  2026-03-16  262  			    testcase->time,
4bbf3f58e00f86 avivdaum  2026-03-16  263  			    time,
b0d4adaf3b3c44 David Gow 2021-04-15  264  			    "Time mismatch\n");
b0d4adaf3b3c44 David Gow 2021-04-15  265  	KUNIT_EXPECT_EQ_MSG(test,
4bbf3f58e00f86 avivdaum  2026-03-16  266  			    testcase->date,
4bbf3f58e00f86 avivdaum  2026-03-16  267  			    date,
b0d4adaf3b3c44 David Gow 2021-04-15  268  			    "Date mismatch\n");
b0d4adaf3b3c44 David Gow 2021-04-15  269  	KUNIT_EXPECT_EQ_MSG(test,
b0d4adaf3b3c44 David Gow 2021-04-15  270  			    testcase->cs,
b0d4adaf3b3c44 David Gow 2021-04-15  271  			    cs,
b0d4adaf3b3c44 David Gow 2021-04-15  272  			    "Centisecond mismatch\n");
b0d4adaf3b3c44 David Gow 2021-04-15  273  }
b0d4adaf3b3c44 David Gow 2021-04-15  274  

:::::: The code at line 261 was first introduced by commit
:::::: b0d4adaf3b3c4402d9c3b6186e02aa1e4f7985cd fat: Add KUnit tests for checksums and timestamps

:::::: TO: David Gow <davidgow@google.com>
:::::: CC: Shuah Khan <skhan@linuxfoundation.org>

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

             reply	other threads:[~2026-06-01 16:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 16:34 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-01 13:55 kernel test robot

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=202606020036.nW4hUG3I-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aviv.daum@gmail.com \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®