All of lore.kernel.org
 help / color / mirror / Atom feed
* [djwong-xfs:timestats-cleanups 547/548] lib/math/mean_and_variance_test.c:33:43: error: field designator 'weight' does not refer to any field in type 'struct mean_and_variance_weighted'
@ 2024-02-07  3:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-07  3:59 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git timestats-cleanups
head:   d07e8ccdf01715f8c7fbbdea9d7910d89c6684fb
commit: 9c23552695abf8c3bacbae100e838e70ad8921e1 [547/548] mean_and_variance: put struct mean_and_variance_weighted on a diet
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20240207/202402071103.5jXo7Iym-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7dd790db8b77c4a833c06632e903dc4f13877a64)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240207/202402071103.5jXo7Iym-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/202402071103.5jXo7Iym-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/math/mean_and_variance_test.c:33:43: error: field designator 'weight' does not refer to any field in type 'struct mean_and_variance_weighted'
      33 |         struct mean_and_variance_weighted s = { .weight = 2 };
         |                                                 ~^~~~~~~~~~
>> lib/math/mean_and_variance_test.c:35:42: error: too few arguments to function call, expected 4, have 2
      35 |         mean_and_variance_weighted_update(&s, 10);
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
   include/linux/mean_and_variance.h:193:6: note: 'mean_and_variance_weighted_update' declared here
     193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
         |      ^                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     194 |                 s64 v, bool initted, u8 weight);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/math/mean_and_variance_test.c:36:61: error: too few arguments to function call, expected 2, have 1
      36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/kunit/test.h:882:28: note: expanded from macro 'KUNIT_EXPECT_EQ'
     882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |                                   ^~~~
   include/kunit/test.h:887:8: note: expanded from macro 'KUNIT_EXPECT_EQ_MSG'
     887 |                                    left, ==, right,                            \
         |                                    ^~~~
   include/kunit/test.h:726:9: note: expanded from macro 'KUNIT_BINARY_INT_ASSERTION'
     726 |                                     left, op, right,                           \
         |                                     ^~~~
   include/kunit/test.h:693:15: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION'
     693 |         const typeof(left) __left = (left);                                    \
         |                      ^~~~
   include/linux/mean_and_variance.h:196:5: note: 'mean_and_variance_weighted_get_mean' declared here
     196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
         |     ^                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     197 |                 u8 weight);
         |                 ~~~~~~~~~
   lib/math/mean_and_variance_test.c:36:61: error: too few arguments to function call, expected 2, have 1
      36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/kunit/test.h:882:28: note: expanded from macro 'KUNIT_EXPECT_EQ'
     882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |                                   ^~~~
   include/kunit/test.h:887:8: note: expanded from macro 'KUNIT_EXPECT_EQ_MSG'
     887 |                                    left, ==, right,                            \
         |                                    ^~~~
   include/kunit/test.h:726:9: note: expanded from macro 'KUNIT_BINARY_INT_ASSERTION'
     726 |                                     left, op, right,                           \
         |                                     ^~~~
   include/kunit/test.h:693:31: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION'
     693 |         const typeof(left) __left = (left);                                    \
         |                                      ^~~~
   include/linux/mean_and_variance.h:196:5: note: 'mean_and_variance_weighted_get_mean' declared here
     196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
         |     ^                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     197 |                 u8 weight);
         |                 ~~~~~~~~~
   lib/math/mean_and_variance_test.c:37:65: error: too few arguments to function call, expected 2, have 1
      37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/kunit/test.h:882:28: note: expanded from macro 'KUNIT_EXPECT_EQ'
     882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |                                   ^~~~
   include/kunit/test.h:887:8: note: expanded from macro 'KUNIT_EXPECT_EQ_MSG'
     887 |                                    left, ==, right,                            \
         |                                    ^~~~
   include/kunit/test.h:726:9: note: expanded from macro 'KUNIT_BINARY_INT_ASSERTION'
     726 |                                     left, op, right,                           \
         |                                     ^~~~
   include/kunit/test.h:693:15: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION'
     693 |         const typeof(left) __left = (left);                                    \
         |                      ^~~~
   include/linux/mean_and_variance.h:198:5: note: 'mean_and_variance_weighted_get_variance' declared here
     198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
         |     ^                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     199 |                 u8 weight);
         |                 ~~~~~~~~~
   lib/math/mean_and_variance_test.c:37:65: error: too few arguments to function call, expected 2, have 1
      37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/kunit/test.h:882:28: note: expanded from macro 'KUNIT_EXPECT_EQ'
     882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
         |                                   ^~~~
   include/kunit/test.h:887:8: note: expanded from macro 'KUNIT_EXPECT_EQ_MSG'
     887 |                                    left, ==, right,                            \
         |                                    ^~~~
   include/kunit/test.h:726:9: note: expanded from macro 'KUNIT_BINARY_INT_ASSERTION'
     726 |                                     left, op, right,                           \
         |                                     ^~~~
   include/kunit/test.h:693:31: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION'
     693 |         const typeof(left) __left = (left);                                    \
         |                                      ^~~~
   include/linux/mean_and_variance.h:198:5: note: 'mean_and_variance_weighted_get_variance' declared here
     198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
         |     ^                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     199 |                 u8 weight);
         |                 ~~~~~~~~~
   lib/math/mean_and_variance_test.c:39:42: error: too few arguments to function call, expected 4, have 2
      39 |         mean_and_variance_weighted_update(&s, 20);
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
   include/linux/mean_and_variance.h:193:6: note: 'mean_and_variance_weighted_update' declared here
     193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
         |      ^                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     194 |                 s64 v, bool initted, u8 weight);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   lib/math/mean_and_variance_test.c:40:61: error: too few arguments to function call, expected 2, have 1
      40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
         |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/kunit/test.h:882:28: note: expanded from macro 'KUNIT_EXPECT_EQ'
     882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)


vim +33 lib/math/mean_and_variance_test.c

92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  25  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  26  /*
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  27   * Test values computed using a spreadsheet from the psuedocode at the bottom:
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  28   * https://fanf2.user.srcf.net/hermes/doc/antiforgery/stats.pdf
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  29   */
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  30  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  31  static void mean_and_variance_weighted_test(struct kunit *test)
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  32  {
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06 @33  	struct mean_and_variance_weighted s = { .weight = 2 };
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  34  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06 @35  	mean_and_variance_weighted_update(&s, 10);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  36  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  37  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  38  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  39  	mean_and_variance_weighted_update(&s, 20);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  40  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  41  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  42  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  43  	mean_and_variance_weighted_update(&s, 30);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  44  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  45  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  46  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  47  	s = (struct mean_and_variance_weighted) { .weight = 2 };
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  48  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  49  	mean_and_variance_weighted_update(&s, -10);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  50  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  51  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  52  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  53  	mean_and_variance_weighted_update(&s, -20);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  54  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  55  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  56  
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  57  	mean_and_variance_weighted_update(&s, -30);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  58  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  59  	KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  60  }
92095781e0f607 fs/bcachefs/mean_and_variance_test.c Daniel Hill 2022-08-06  61  

:::::: The code at line 33 was first introduced by commit
:::::: 92095781e0f607e735971c1a6462ca6dad8826d2 bcachefs: Mean and variance

:::::: TO: Daniel Hill <daniel@gluo.nz>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>

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

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

only message in thread, other threads:[~2024-02-07  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  3:59 [djwong-xfs:timestats-cleanups 547/548] lib/math/mean_and_variance_test.c:33:43: error: field designator 'weight' does not refer to any field in type 'struct mean_and_variance_weighted' 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.