public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types)
@ 2023-11-18  0:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-11-18  0:52 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: oe-kbuild-all, linux-kernel, Shuah Khan, David Gow

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   12ee72fe01e45a9586b9d130c5501763818c8efc
commit: d1a0d699bfc00ae5b5e74bb640d791a93e825b68 kunit: string-stream: Add tests for freeing resource-managed string_stream
date:   9 weeks ago
config: sparc-randconfig-r021-20230427 (https://download.01.org/0day-ci/archive/20231118/202311180846.j5VBD2IH-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231118/202311180846.j5VBD2IH-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/202311180846.j5VBD2IH-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted gfp_t const __left @@
   lib/kunit/string-stream-test.c:73:9: sparse:     expected long long left_value
   lib/kunit/string-stream-test.c:73:9: sparse:     got restricted gfp_t const __left
>> lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted gfp_t const __right @@
   lib/kunit/string-stream-test.c:73:9: sparse:     expected long long right_value
   lib/kunit/string-stream-test.c:73:9: sparse:     got restricted gfp_t const __right
   lib/kunit/string-stream-test.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +73 lib/kunit/string-stream-test.c

    61	
    62	/* Unmanaged string_stream object is initialized correctly. */
    63	static void string_stream_unmanaged_init_test(struct kunit *test)
    64	{
    65		struct string_stream *stream;
    66	
    67		stream = alloc_string_stream(GFP_KERNEL);
    68		KUNIT_ASSERT_NOT_ERR_OR_NULL(test, stream);
    69		kunit_add_action(test, cleanup_raw_stream, stream);
    70	
    71		KUNIT_EXPECT_EQ(test, stream->length, 0);
    72		KUNIT_EXPECT_TRUE(test, list_empty(&stream->fragments));
  > 73		KUNIT_EXPECT_EQ(test, stream->gfp, GFP_KERNEL);
    74		KUNIT_EXPECT_FALSE(test, stream->append_newlines);
    75	
    76		KUNIT_EXPECT_TRUE(test, string_stream_is_empty(stream));
    77	}
    78	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types)
@ 2023-11-18 11:23 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-11-18 11:23 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: oe-kbuild-all, linux-kernel, Shuah Khan, David Gow

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   791c8ab095f71327899023223940dd52257a4173
commit: d1a0d699bfc00ae5b5e74bb640d791a93e825b68 kunit: string-stream: Add tests for freeing resource-managed string_stream
date:   9 weeks ago
config: x86_64-randconfig-x001-20230717 (https://download.01.org/0day-ci/archive/20231118/202311181918.0mpCu2Xh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231118/202311181918.0mpCu2Xh-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/202311181918.0mpCu2Xh-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long left_value @@     got restricted gfp_t const __left @@
   lib/kunit/string-stream-test.c:73:9: sparse:     expected long long left_value
   lib/kunit/string-stream-test.c:73:9: sparse:     got restricted gfp_t const __left
>> lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected long long right_value @@     got restricted gfp_t const __right @@
   lib/kunit/string-stream-test.c:73:9: sparse:     expected long long right_value
   lib/kunit/string-stream-test.c:73:9: sparse:     got restricted gfp_t const __right

vim +73 lib/kunit/string-stream-test.c

    61	
    62	/* Unmanaged string_stream object is initialized correctly. */
    63	static void string_stream_unmanaged_init_test(struct kunit *test)
    64	{
    65		struct string_stream *stream;
    66	
    67		stream = alloc_string_stream(GFP_KERNEL);
    68		KUNIT_ASSERT_NOT_ERR_OR_NULL(test, stream);
    69		kunit_add_action(test, cleanup_raw_stream, stream);
    70	
    71		KUNIT_EXPECT_EQ(test, stream->length, 0);
    72		KUNIT_EXPECT_TRUE(test, list_empty(&stream->fragments));
  > 73		KUNIT_EXPECT_EQ(test, stream->gfp, GFP_KERNEL);
    74		KUNIT_EXPECT_FALSE(test, stream->append_newlines);
    75	
    76		KUNIT_EXPECT_TRUE(test, string_stream_is_empty(stream));
    77	}
    78	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-18 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-18  0:52 lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-11-18 11:23 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox