linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the bcachefs tree
@ 2023-09-12  2:04 Stephen Rothwell
  2023-09-12  2:47 ` Qi Zheng
  2023-09-13 22:14 ` Stephen Rothwell
  0 siblings, 2 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-09-12  2:04 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Kent Overstreet, Andrew Morton, Qi Zheng,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 7742 bytes --]

Hi all,

After merging the bcachefs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_exit':
fs/bcachefs/btree_cache.c:403:9: error: implicit declaration of function 'unregister_shrinker'; did you mean 'unregister_chrdev'? [-Werror=implicit-function-declaration]
  403 |         unregister_shrinker(&bc->shrink);
      |         ^~~~~~~~~~~~~~~~~~~
      |         unregister_chrdev
fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_init':
fs/bcachefs/btree_cache.c:479:15: error: implicit declaration of function 'register_shrinker'; did you mean 'register_chrdev'? [-Werror=implicit-function-declaration]
  479 |         ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
      |               ^~~~~~~~~~~~~~~~~
      |               register_chrdev
cc1: all warnings being treated as errors

Caused by commits

  5ec30115c066 ("bcachefs: Initial commit")

interacting with commit

  eba045d9350d ("mm: shrinker: remove old APIs")

from v6.6-rc1.

I have applied the following merge resolution patch for today.  More may
be needed.

From 801ad185700d9a7abcf156233b9db6cf6d831581 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 Sep 2023 11:27:22 +1000
Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/bcachefs/btree_cache.c     | 19 +++++++++++--------
 fs/bcachefs/btree_key_cache.c | 18 +++++++++++-------
 fs/bcachefs/btree_types.h     |  4 ++--
 fs/bcachefs/fs.c              |  2 +-
 fs/bcachefs/sysfs.c           |  2 +-
 5 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
index 245ddd92b2d1..7f0eded6c296 100644
--- a/fs/bcachefs/btree_cache.c
+++ b/fs/bcachefs/btree_cache.c
@@ -285,7 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
 static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
 					   struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
+	struct bch_fs *c = container_of(&shrink, struct bch_fs,
 					btree_cache.shrink);
 	struct btree_cache *bc = &c->btree_cache;
 	struct btree *b, *t;
@@ -384,7 +384,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
 static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
 					    struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
+	struct bch_fs *c = container_of(&shrink, struct bch_fs,
 					btree_cache.shrink);
 	struct btree_cache *bc = &c->btree_cache;
 
@@ -400,7 +400,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
 	struct btree *b;
 	unsigned i, flags;
 
-	unregister_shrinker(&bc->shrink);
+	shrinker_free(bc->shrink);
 
 	/* vfree() can allocate memory: */
 	flags = memalloc_nofs_save();
@@ -454,6 +454,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
 int bch2_fs_btree_cache_init(struct bch_fs *c)
 {
 	struct btree_cache *bc = &c->btree_cache;
+	struct shrinker *shrink;
 	unsigned i;
 	int ret = 0;
 
@@ -473,12 +474,14 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
 
 	mutex_init(&c->verify_lock);
 
-	bc->shrink.count_objects	= bch2_btree_cache_count;
-	bc->shrink.scan_objects		= bch2_btree_cache_scan;
-	bc->shrink.seeks		= 4;
-	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
-	if (ret)
+	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
+	if (!shrink)
 		goto err;
+	bc->shrink = shrink;
+	shrink->count_objects	= bch2_btree_cache_count;
+	shrink->scan_objects	= bch2_btree_cache_scan;
+	shrink->seeks		= 4;
+	shrinker_register(shrink);
 
 	return 0;
 err:
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 505e7c365ab7..88d33690233b 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -838,7 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
 static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
 					   struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
+	struct bch_fs *c = container_of(&shrink, struct bch_fs,
 					btree_key_cache.shrink);
 	struct btree_key_cache *bc = &c->btree_key_cache;
 	struct bucket_table *tbl;
@@ -936,7 +936,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
 static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
 					    struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
+	struct bch_fs *c = container_of(&shrink, struct bch_fs,
 					btree_key_cache.shrink);
 	struct btree_key_cache *bc = &c->btree_key_cache;
 	long nr = atomic_long_read(&bc->nr_keys) -
@@ -957,7 +957,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
 	int cpu;
 #endif
 
-	unregister_shrinker(&bc->shrink);
+	shrinker_free(bc->shrink);
 
 	mutex_lock(&bc->lock);
 
@@ -1031,6 +1031,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)
 int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
 {
 	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
+	struct shrinker *shrink;
 
 #ifdef __KERNEL__
 	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
@@ -1043,11 +1044,14 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
 
 	bc->table_init_done = true;
 
-	bc->shrink.seeks		= 0;
-	bc->shrink.count_objects	= bch2_btree_key_cache_count;
-	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
-	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
+	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
+	if (!shrink)
 		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
+	bc->shrink = shrink;
+	shrink->seeks		= 0;
+	shrink->count_objects	= bch2_btree_key_cache_count;
+	shrink->scan_objects	= bch2_btree_key_cache_scan;
+	shrinker_register(shrink);
 	return 0;
 }
 
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
index 70398aaa095e..fac0abdaf167 100644
--- a/fs/bcachefs/btree_types.h
+++ b/fs/bcachefs/btree_types.h
@@ -163,7 +163,7 @@ struct btree_cache {
 	unsigned		used;
 	unsigned		reserve;
 	atomic_t		dirty;
-	struct shrinker		shrink;
+	struct shrinker		*shrink;
 
 	/*
 	 * If we need to allocate memory for a new btree node and that
@@ -321,7 +321,7 @@ struct btree_key_cache {
 	bool			table_init_done;
 	struct list_head	freed_pcpu;
 	struct list_head	freed_nonpcpu;
-	struct shrinker		shrink;
+	struct shrinker		*shrink;
 	unsigned		shrink_iter;
 	struct btree_key_cache_freelist __percpu *pcpu_freed;
 
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 48431700b83e..bdc8573631bd 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1885,7 +1885,7 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
 		sb->s_flags	|= SB_POSIXACL;
 #endif
 
-	sb->s_shrink.seeks = 0;
+	sb->s_shrink->seeks = 0;
 
 	vinode = bch2_vfs_inode_get(c, BCACHEFS_ROOT_SUBVOL_INUM);
 	ret = PTR_ERR_OR_ZERO(vinode);
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 41c6900c34c1..a9f480c26bb4 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -522,7 +522,7 @@ STORE(bch2_fs)
 
 		sc.gfp_mask = GFP_KERNEL;
 		sc.nr_to_scan = strtoul_or_return(buf);
-		c->btree_cache.shrink.scan_objects(&c->btree_cache.shrink, &sc);
+		c->btree_cache.shrink->scan_objects(c->btree_cache.shrink, &sc);
 	}
 
 	if (attr == &sysfs_btree_wakeup)
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-12  2:04 linux-next: build failure after merge of the bcachefs tree Stephen Rothwell
@ 2023-09-12  2:47 ` Qi Zheng
  2023-09-12 23:35   ` Stephen Rothwell
  2023-09-13 22:14 ` Stephen Rothwell
  1 sibling, 1 reply; 20+ messages in thread
From: Qi Zheng @ 2023-09-12  2:47 UTC (permalink / raw)
  To: Stephen Rothwell, Kent Overstreet
  Cc: Kent Overstreet, Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List

Hi Stephen,

On 2023/9/12 10:04, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the bcachefs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_exit':
> fs/bcachefs/btree_cache.c:403:9: error: implicit declaration of function 'unregister_shrinker'; did you mean 'unregister_chrdev'? [-Werror=implicit-function-declaration]
>    403 |         unregister_shrinker(&bc->shrink);
>        |         ^~~~~~~~~~~~~~~~~~~
>        |         unregister_chrdev
> fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_init':
> fs/bcachefs/btree_cache.c:479:15: error: implicit declaration of function 'register_shrinker'; did you mean 'register_chrdev'? [-Werror=implicit-function-declaration]
>    479 |         ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
>        |               ^~~~~~~~~~~~~~~~~
>        |               register_chrdev
> cc1: all warnings being treated as errors
> 
> Caused by commits
> 
>    5ec30115c066 ("bcachefs: Initial commit")
> 
> interacting with commit
> 
>    eba045d9350d ("mm: shrinker: remove old APIs")
> 
> from v6.6-rc1.
> 
> I have applied the following merge resolution patch for today.  More may
> be needed.

Thanks for doing this! Some needed fixes below.

> 
>  From 801ad185700d9a7abcf156233b9db6cf6d831581 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 12 Sep 2023 11:27:22 +1000
> Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   fs/bcachefs/btree_cache.c     | 19 +++++++++++--------
>   fs/bcachefs/btree_key_cache.c | 18 +++++++++++-------
>   fs/bcachefs/btree_types.h     |  4 ++--
>   fs/bcachefs/fs.c              |  2 +-
>   fs/bcachefs/sysfs.c           |  2 +-
>   5 files changed, 26 insertions(+), 19 deletions(-)
> 
> diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
> index 245ddd92b2d1..7f0eded6c296 100644
> --- a/fs/bcachefs/btree_cache.c
> +++ b/fs/bcachefs/btree_cache.c
> @@ -285,7 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
>   static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>   					   struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>   					btree_cache.shrink);

The shrink passed in here will be a local variable, so its address can
not be used directly. So need to be modified as follows:

	struct bch_fs *c = shrink->private_data;

>   	struct btree_cache *bc = &c->btree_cache;
>   	struct btree *b, *t;
> @@ -384,7 +384,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>   static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
>   					    struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>   					btree_cache.shrink);

Ditto.

>   	struct btree_cache *bc = &c->btree_cache;
>   
> @@ -400,7 +400,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
>   	struct btree *b;
>   	unsigned i, flags;
>   
> -	unregister_shrinker(&bc->shrink);
> +	shrinker_free(bc->shrink);
>   
>   	/* vfree() can allocate memory: */
>   	flags = memalloc_nofs_save();
> @@ -454,6 +454,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
>   int bch2_fs_btree_cache_init(struct bch_fs *c)
>   {
>   	struct btree_cache *bc = &c->btree_cache;
> +	struct shrinker *shrink;
>   	unsigned i;
>   	int ret = 0;
>   
> @@ -473,12 +474,14 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
>   
>   	mutex_init(&c->verify_lock);
>   
> -	bc->shrink.count_objects	= bch2_btree_cache_count;
> -	bc->shrink.scan_objects		= bch2_btree_cache_scan;
> -	bc->shrink.seeks		= 4;
> -	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
> -	if (ret)
> +	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
> +	if (!shrink)
>   		goto err;

Here the 'ret' needs to be set to -ENOMEM.

	if (!shrink) {
		ret = -ENOMEM;
		goto err;
	}


> +	bc->shrink = shrink;
> +	shrink->count_objects	= bch2_btree_cache_count;
> +	shrink->scan_objects	= bch2_btree_cache_scan;
> +	shrink->seeks		= 4;

	shrink->private_data = c;

> +	shrinker_register(shrink);
>   
>   	return 0;
>   err:
> diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
> index 505e7c365ab7..88d33690233b 100644
> --- a/fs/bcachefs/btree_key_cache.c
> +++ b/fs/bcachefs/btree_key_cache.c
> @@ -838,7 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
>   static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>   					   struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>   					btree_key_cache.shrink);

	struct bch_fs *c = shrink->private_data;

>   	struct btree_key_cache *bc = &c->btree_key_cache;
>   	struct bucket_table *tbl;
> @@ -936,7 +936,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>   static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
>   					    struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>   					btree_key_cache.shrink);

Ditto.

>   	struct btree_key_cache *bc = &c->btree_key_cache;
>   	long nr = atomic_long_read(&bc->nr_keys) -
> @@ -957,7 +957,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
>   	int cpu;
>   #endif
>   
> -	unregister_shrinker(&bc->shrink);
> +	shrinker_free(bc->shrink);
>   
>   	mutex_lock(&bc->lock);
>   
> @@ -1031,6 +1031,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)
>   int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
>   {
>   	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
> +	struct shrinker *shrink;
>   
>   #ifdef __KERNEL__
>   	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
> @@ -1043,11 +1044,14 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)

	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);

>   
>   	bc->table_init_done = true;
>   
> -	bc->shrink.seeks		= 0;
> -	bc->shrink.count_objects	= bch2_btree_key_cache_count;
> -	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
> -	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
> +	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
> +	if (!shrink)
>   		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
> +	bc->shrink = shrink;
> +	shrink->seeks		= 0;
> +	shrink->count_objects	= bch2_btree_key_cache_count;
> +	shrink->scan_objects	= bch2_btree_key_cache_scan;

	shrink->private_data = c;

> +	shrinker_register(shrink);
>   	return 0;
>   }
>   
> diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
> index 70398aaa095e..fac0abdaf167 100644
> --- a/fs/bcachefs/btree_types.h
> +++ b/fs/bcachefs/btree_types.h
> @@ -163,7 +163,7 @@ struct btree_cache {
>   	unsigned		used;
>   	unsigned		reserve;
>   	atomic_t		dirty;
> -	struct shrinker		shrink;
> +	struct shrinker		*shrink;
>   
>   	/*
>   	 * If we need to allocate memory for a new btree node and that
> @@ -321,7 +321,7 @@ struct btree_key_cache {
>   	bool			table_init_done;
>   	struct list_head	freed_pcpu;
>   	struct list_head	freed_nonpcpu;
> -	struct shrinker		shrink;
> +	struct shrinker		*shrink;
>   	unsigned		shrink_iter;
>   	struct btree_key_cache_freelist __percpu *pcpu_freed;
>   
> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
> index 48431700b83e..bdc8573631bd 100644
> --- a/fs/bcachefs/fs.c
> +++ b/fs/bcachefs/fs.c
> @@ -1885,7 +1885,7 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
>   		sb->s_flags	|= SB_POSIXACL;
>   #endif
>   
> -	sb->s_shrink.seeks = 0;
> +	sb->s_shrink->seeks = 0;
>   
>   	vinode = bch2_vfs_inode_get(c, BCACHEFS_ROOT_SUBVOL_INUM);
>   	ret = PTR_ERR_OR_ZERO(vinode);
> diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
> index 41c6900c34c1..a9f480c26bb4 100644
> --- a/fs/bcachefs/sysfs.c
> +++ b/fs/bcachefs/sysfs.c
> @@ -522,7 +522,7 @@ STORE(bch2_fs)
>   
>   		sc.gfp_mask = GFP_KERNEL;
>   		sc.nr_to_scan = strtoul_or_return(buf);
> -		c->btree_cache.shrink.scan_objects(&c->btree_cache.shrink, &sc);
> +		c->btree_cache.shrink->scan_objects(c->btree_cache.shrink, &sc);
>   	}
>   
>   	if (attr == &sysfs_btree_wakeup)

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-12  2:47 ` Qi Zheng
@ 2023-09-12 23:35   ` Stephen Rothwell
  2023-09-13  1:10     ` Qi Zheng
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2023-09-12 23:35 UTC (permalink / raw)
  To: Qi Zheng
  Cc: Kent Overstreet, Kent Overstreet, Andrew Morton,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 11429 bytes --]

Hi Qi,

Thanks for the corrections.  See below.

On Tue, 12 Sep 2023 10:47:14 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:
>
> > diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
> > index 245ddd92b2d1..7f0eded6c296 100644
> > --- a/fs/bcachefs/btree_cache.c
> > +++ b/fs/bcachefs/btree_cache.c
> > @@ -285,7 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
> >   static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
> >   					   struct shrink_control *sc)
> >   {
> > -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> > +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
> >   					btree_cache.shrink);  
> 
> The shrink passed in here will be a local variable, so its address can
> not be used directly. So need to be modified as follows:
> 
> 	struct bch_fs *c = shrink->private_data;

OK.

> > @@ -384,7 +384,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
> >   static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
> >   					    struct shrink_control *sc)
> >   {
> > -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> > +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
> >   					btree_cache.shrink);  
> 
> Ditto.

OK

> >   > @@ -473,12 +474,14 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
> >   >   	mutex_init(&c->verify_lock);
> >   > -	bc->shrink.count_objects	= bch2_btree_cache_count;  
> > -	bc->shrink.scan_objects		= bch2_btree_cache_scan;
> > -	bc->shrink.seeks		= 4;
> > -	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
> > -	if (ret)
> > +	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
> > +	if (!shrink)
> >   		goto err;  
> 
> Here the 'ret' needs to be set to -ENOMEM.
> 
> 	if (!shrink) {
> 		ret = -ENOMEM;
> 		goto err;
> 	}

Except err: does this:

    return -BCH_ERR_ENOMEM_fs_btree_cache_init;

so ret does not need to be set.

> > +	bc->shrink = shrink;
> > +	shrink->count_objects	= bch2_btree_cache_count;
> > +	shrink->scan_objects	= bch2_btree_cache_scan;
> > +	shrink->seeks		= 4;  
> 
> 	shrink->private_data = c;

OK

> > diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
> > index 505e7c365ab7..88d33690233b 100644
> > --- a/fs/bcachefs/btree_key_cache.c
> > +++ b/fs/bcachefs/btree_key_cache.c
> > @@ -838,7 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
> >   static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
> >   					   struct shrink_control *sc)
> >   {
> > -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> > +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
> >   					btree_key_cache.shrink);  
> 
> 	struct bch_fs *c = shrink->private_data;
> 

OK

> > @@ -936,7 +936,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
> >   static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
> >   					    struct shrink_control *sc)
> >   {
> > -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> > +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
> >   					btree_key_cache.shrink);  
> 
> Ditto.

OK

> > @@ -957,7 +957,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
> >   	int cpu;
> >   #endif  
> >   > -	unregister_shrinker(&bc->shrink);  
> > +	shrinker_free(bc->shrink);  
> >   >   	mutex_lock(&bc->lock);
> >   > @@ -1031,6 +1031,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)  
> >   int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
> >   {
> >   	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
> > +	struct shrinker *shrink;  
> >   >   #ifdef __KERNEL__  
> >   	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
> > @@ -1043,11 +1044,14 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)  
> 
> 	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);

Already done n this function.

> >   >   	bc->table_init_done = true;
> >   > -	bc->shrink.seeks		= 0;  
> > -	bc->shrink.count_objects	= bch2_btree_key_cache_count;
> > -	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
> > -	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
> > +	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
> > +	if (!shrink)
> >   		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
> > +	bc->shrink = shrink;
> > +	shrink->seeks		= 0;
> > +	shrink->count_objects	= bch2_btree_key_cache_count;
> > +	shrink->scan_objects	= bch2_btree_key_cache_scan;  
> 
> 	shrink->private_data = c;

OK

So the merge resolution patch now looks like this:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 12 Sep 2023 11:27:22 +1000
Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
 fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
 fs/bcachefs/btree_types.h     |  4 ++--
 fs/bcachefs/fs.c              |  2 +-
 fs/bcachefs/sysfs.c           |  2 +-
 5 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
index 245ddd92b2d1..d8cd0bbc33cc 100644
--- a/fs/bcachefs/btree_cache.c
+++ b/fs/bcachefs/btree_cache.c
@@ -285,8 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
 static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
 					   struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
-					btree_cache.shrink);
+	struct bch_fs *c = shrink->private_data;
 	struct btree_cache *bc = &c->btree_cache;
 	struct btree *b, *t;
 	unsigned long nr = sc->nr_to_scan;
@@ -384,8 +383,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
 static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
 					    struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
-					btree_cache.shrink);
+	struct bch_fs *c = shrink->private_data;
 	struct btree_cache *bc = &c->btree_cache;
 
 	if (bch2_btree_shrinker_disabled)
@@ -400,7 +398,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
 	struct btree *b;
 	unsigned i, flags;
 
-	unregister_shrinker(&bc->shrink);
+	shrinker_free(bc->shrink);
 
 	/* vfree() can allocate memory: */
 	flags = memalloc_nofs_save();
@@ -454,6 +452,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
 int bch2_fs_btree_cache_init(struct bch_fs *c)
 {
 	struct btree_cache *bc = &c->btree_cache;
+	struct shrinker *shrink;
 	unsigned i;
 	int ret = 0;
 
@@ -473,12 +472,15 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
 
 	mutex_init(&c->verify_lock);
 
-	bc->shrink.count_objects	= bch2_btree_cache_count;
-	bc->shrink.scan_objects		= bch2_btree_cache_scan;
-	bc->shrink.seeks		= 4;
-	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
-	if (ret)
+	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
+	if (!shrink)
 		goto err;
+	bc->shrink = shrink;
+	shrink->count_objects	= bch2_btree_cache_count;
+	shrink->scan_objects	= bch2_btree_cache_scan;
+	shrink->seeks		= 4;
+	shrink->private_data	= c;
+	shrinker_register(shrink);
 
 	return 0;
 err:
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 505e7c365ab7..ed387eb915c3 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -838,8 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
 static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
 					   struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
-					btree_key_cache.shrink);
+	struct bch_fs *c = shrink->private_data;
 	struct btree_key_cache *bc = &c->btree_key_cache;
 	struct bucket_table *tbl;
 	struct bkey_cached *ck, *t;
@@ -936,8 +935,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
 static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
 					    struct shrink_control *sc)
 {
-	struct bch_fs *c = container_of(shrink, struct bch_fs,
-					btree_key_cache.shrink);
+	struct bch_fs *c = shrink->private_data;
 	struct btree_key_cache *bc = &c->btree_key_cache;
 	long nr = atomic_long_read(&bc->nr_keys) -
 		atomic_long_read(&bc->nr_dirty);
@@ -957,7 +955,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
 	int cpu;
 #endif
 
-	unregister_shrinker(&bc->shrink);
+	shrinker_free(bc->shrink);
 
 	mutex_lock(&bc->lock);
 
@@ -1031,6 +1029,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)
 int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
 {
 	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
+	struct shrinker *shrink;
 
 #ifdef __KERNEL__
 	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
@@ -1043,11 +1042,15 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
 
 	bc->table_init_done = true;
 
-	bc->shrink.seeks		= 0;
-	bc->shrink.count_objects	= bch2_btree_key_cache_count;
-	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
-	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
+	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
+	if (!shrink)
 		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
+	bc->shrink = shrink;
+	shrink->seeks		= 0;
+	shrink->count_objects	= bch2_btree_key_cache_count;
+	shrink->scan_objects	= bch2_btree_key_cache_scan;
+	shrink->private_data	= c;
+	shrinker_register(shrink);
 	return 0;
 }
 
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
index 70398aaa095e..fac0abdaf167 100644
--- a/fs/bcachefs/btree_types.h
+++ b/fs/bcachefs/btree_types.h
@@ -163,7 +163,7 @@ struct btree_cache {
 	unsigned		used;
 	unsigned		reserve;
 	atomic_t		dirty;
-	struct shrinker		shrink;
+	struct shrinker		*shrink;
 
 	/*
 	 * If we need to allocate memory for a new btree node and that
@@ -321,7 +321,7 @@ struct btree_key_cache {
 	bool			table_init_done;
 	struct list_head	freed_pcpu;
 	struct list_head	freed_nonpcpu;
-	struct shrinker		shrink;
+	struct shrinker		*shrink;
 	unsigned		shrink_iter;
 	struct btree_key_cache_freelist __percpu *pcpu_freed;
 
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 48431700b83e..bdc8573631bd 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1885,7 +1885,7 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
 		sb->s_flags	|= SB_POSIXACL;
 #endif
 
-	sb->s_shrink.seeks = 0;
+	sb->s_shrink->seeks = 0;
 
 	vinode = bch2_vfs_inode_get(c, BCACHEFS_ROOT_SUBVOL_INUM);
 	ret = PTR_ERR_OR_ZERO(vinode);
diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
index 41c6900c34c1..a9f480c26bb4 100644
--- a/fs/bcachefs/sysfs.c
+++ b/fs/bcachefs/sysfs.c
@@ -522,7 +522,7 @@ STORE(bch2_fs)
 
 		sc.gfp_mask = GFP_KERNEL;
 		sc.nr_to_scan = strtoul_or_return(buf);
-		c->btree_cache.shrink.scan_objects(&c->btree_cache.shrink, &sc);
+		c->btree_cache.shrink->scan_objects(c->btree_cache.shrink, &sc);
 	}
 
 	if (attr == &sysfs_btree_wakeup)
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-12 23:35   ` Stephen Rothwell
@ 2023-09-13  1:10     ` Qi Zheng
  2023-09-13 20:23       ` Andrew Morton
  0 siblings, 1 reply; 20+ messages in thread
From: Qi Zheng @ 2023-09-13  1:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Kent Overstreet, Kent Overstreet, Andrew Morton,
	Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

On 2023/9/13 07:35, Stephen Rothwell wrote:
> Hi Qi,
> 
> Thanks for the corrections.  See below.
> 
> On Tue, 12 Sep 2023 10:47:14 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:
>>
>>> diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
>>> index 245ddd92b2d1..7f0eded6c296 100644
>>> --- a/fs/bcachefs/btree_cache.c
>>> +++ b/fs/bcachefs/btree_cache.c
>>> @@ -285,7 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
>>>    static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>>>    					   struct shrink_control *sc)
>>>    {
>>> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
>>> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>>>    					btree_cache.shrink);
>>
>> The shrink passed in here will be a local variable, so its address can
>> not be used directly. So need to be modified as follows:
>>
>> 	struct bch_fs *c = shrink->private_data;
> 
> OK.
> 
>>> @@ -384,7 +384,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>>>    static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
>>>    					    struct shrink_control *sc)
>>>    {
>>> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
>>> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>>>    					btree_cache.shrink);
>>
>> Ditto.
> 
> OK
> 
>>>    > @@ -473,12 +474,14 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
>>>    >   	mutex_init(&c->verify_lock);
>>>    > -	bc->shrink.count_objects	= bch2_btree_cache_count;
>>> -	bc->shrink.scan_objects		= bch2_btree_cache_scan;
>>> -	bc->shrink.seeks		= 4;
>>> -	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
>>> -	if (ret)
>>> +	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
>>> +	if (!shrink)
>>>    		goto err;
>>
>> Here the 'ret' needs to be set to -ENOMEM.
>>
>> 	if (!shrink) {
>> 		ret = -ENOMEM;
>> 		goto err;
>> 	}
> 
> Except err: does this:
> 
>      return -BCH_ERR_ENOMEM_fs_btree_cache_init;
> 
> so ret does not need to be set.
> 
>>> +	bc->shrink = shrink;
>>> +	shrink->count_objects	= bch2_btree_cache_count;
>>> +	shrink->scan_objects	= bch2_btree_cache_scan;
>>> +	shrink->seeks		= 4;
>>
>> 	shrink->private_data = c;
> 
> OK
> 
>>> diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
>>> index 505e7c365ab7..88d33690233b 100644
>>> --- a/fs/bcachefs/btree_key_cache.c
>>> +++ b/fs/bcachefs/btree_key_cache.c
>>> @@ -838,7 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
>>>    static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>>>    					   struct shrink_control *sc)
>>>    {
>>> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
>>> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>>>    					btree_key_cache.shrink);
>>
>> 	struct bch_fs *c = shrink->private_data;
>>
> 
> OK
> 
>>> @@ -936,7 +936,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>>>    static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
>>>    					    struct shrink_control *sc)
>>>    {
>>> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
>>> +	struct bch_fs *c = container_of(&shrink, struct bch_fs,
>>>    					btree_key_cache.shrink);
>>
>> Ditto.
> 
> OK
> 
>>> @@ -957,7 +957,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
>>>    	int cpu;
>>>    #endif
>>>    > -	unregister_shrinker(&bc->shrink);
>>> +	shrinker_free(bc->shrink);
>>>    >   	mutex_lock(&bc->lock);
>>>    > @@ -1031,6 +1031,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)
>>>    int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
>>>    {
>>>    	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
>>> +	struct shrinker *shrink;
>>>    >   #ifdef __KERNEL__
>>>    	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
>>> @@ -1043,11 +1044,14 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
>>
>> 	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
> 
> Already done n this function.
> 
>>>    >   	bc->table_init_done = true;
>>>    > -	bc->shrink.seeks		= 0;
>>> -	bc->shrink.count_objects	= bch2_btree_key_cache_count;
>>> -	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
>>> -	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
>>> +	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
>>> +	if (!shrink)
>>>    		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
>>> +	bc->shrink = shrink;
>>> +	shrink->seeks		= 0;
>>> +	shrink->count_objects	= bch2_btree_key_cache_count;
>>> +	shrink->scan_objects	= bch2_btree_key_cache_scan;
>>
>> 	shrink->private_data = c;
> 
> OK
> 
> So the merge resolution patch now looks like this:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 12 Sep 2023 11:27:22 +1000
> Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
>   fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
>   fs/bcachefs/btree_types.h     |  4 ++--
>   fs/bcachefs/fs.c              |  2 +-
>   fs/bcachefs/sysfs.c           |  2 +-
>   5 files changed, 28 insertions(+), 23 deletions(-)

This version looks good to me.

Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>

Thanks,
Qi

> 
> diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
> index 245ddd92b2d1..d8cd0bbc33cc 100644
> --- a/fs/bcachefs/btree_cache.c
> +++ b/fs/bcachefs/btree_cache.c
> @@ -285,8 +285,7 @@ static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b)
>   static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>   					   struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> -					btree_cache.shrink);
> +	struct bch_fs *c = shrink->private_data;
>   	struct btree_cache *bc = &c->btree_cache;
>   	struct btree *b, *t;
>   	unsigned long nr = sc->nr_to_scan;
> @@ -384,8 +383,7 @@ static unsigned long bch2_btree_cache_scan(struct shrinker *shrink,
>   static unsigned long bch2_btree_cache_count(struct shrinker *shrink,
>   					    struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> -					btree_cache.shrink);
> +	struct bch_fs *c = shrink->private_data;
>   	struct btree_cache *bc = &c->btree_cache;
>   
>   	if (bch2_btree_shrinker_disabled)
> @@ -400,7 +398,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
>   	struct btree *b;
>   	unsigned i, flags;
>   
> -	unregister_shrinker(&bc->shrink);
> +	shrinker_free(bc->shrink);
>   
>   	/* vfree() can allocate memory: */
>   	flags = memalloc_nofs_save();
> @@ -454,6 +452,7 @@ void bch2_fs_btree_cache_exit(struct bch_fs *c)
>   int bch2_fs_btree_cache_init(struct bch_fs *c)
>   {
>   	struct btree_cache *bc = &c->btree_cache;
> +	struct shrinker *shrink;
>   	unsigned i;
>   	int ret = 0;
>   
> @@ -473,12 +472,15 @@ int bch2_fs_btree_cache_init(struct bch_fs *c)
>   
>   	mutex_init(&c->verify_lock);
>   
> -	bc->shrink.count_objects	= bch2_btree_cache_count;
> -	bc->shrink.scan_objects		= bch2_btree_cache_scan;
> -	bc->shrink.seeks		= 4;
> -	ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
> -	if (ret)
> +	shrink = shrinker_alloc(0, "%s/btree_cache", c->name);
> +	if (!shrink)
>   		goto err;
> +	bc->shrink = shrink;
> +	shrink->count_objects	= bch2_btree_cache_count;
> +	shrink->scan_objects	= bch2_btree_cache_scan;
> +	shrink->seeks		= 4;
> +	shrink->private_data	= c;
> +	shrinker_register(shrink);
>   
>   	return 0;
>   err:
> diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
> index 505e7c365ab7..ed387eb915c3 100644
> --- a/fs/bcachefs/btree_key_cache.c
> +++ b/fs/bcachefs/btree_key_cache.c
> @@ -838,8 +838,7 @@ void bch2_btree_key_cache_drop(struct btree_trans *trans,
>   static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>   					   struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> -					btree_key_cache.shrink);
> +	struct bch_fs *c = shrink->private_data;
>   	struct btree_key_cache *bc = &c->btree_key_cache;
>   	struct bucket_table *tbl;
>   	struct bkey_cached *ck, *t;
> @@ -936,8 +935,7 @@ static unsigned long bch2_btree_key_cache_scan(struct shrinker *shrink,
>   static unsigned long bch2_btree_key_cache_count(struct shrinker *shrink,
>   					    struct shrink_control *sc)
>   {
> -	struct bch_fs *c = container_of(shrink, struct bch_fs,
> -					btree_key_cache.shrink);
> +	struct bch_fs *c = shrink->private_data;
>   	struct btree_key_cache *bc = &c->btree_key_cache;
>   	long nr = atomic_long_read(&bc->nr_keys) -
>   		atomic_long_read(&bc->nr_dirty);
> @@ -957,7 +955,7 @@ void bch2_fs_btree_key_cache_exit(struct btree_key_cache *bc)
>   	int cpu;
>   #endif
>   
> -	unregister_shrinker(&bc->shrink);
> +	shrinker_free(bc->shrink);
>   
>   	mutex_lock(&bc->lock);
>   
> @@ -1031,6 +1029,7 @@ void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *c)
>   int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
>   {
>   	struct bch_fs *c = container_of(bc, struct bch_fs, btree_key_cache);
> +	struct shrinker *shrink;
>   
>   #ifdef __KERNEL__
>   	bc->pcpu_freed = alloc_percpu(struct btree_key_cache_freelist);
> @@ -1043,11 +1042,15 @@ int bch2_fs_btree_key_cache_init(struct btree_key_cache *bc)
>   
>   	bc->table_init_done = true;
>   
> -	bc->shrink.seeks		= 0;
> -	bc->shrink.count_objects	= bch2_btree_key_cache_count;
> -	bc->shrink.scan_objects		= bch2_btree_key_cache_scan;
> -	if (register_shrinker(&bc->shrink, "%s/btree_key_cache", c->name))
> +	shrink = shrinker_alloc(0, "%s/btree_key_cache", c->name);
> +	if (!shrink)
>   		return -BCH_ERR_ENOMEM_fs_btree_cache_init;
> +	bc->shrink = shrink;
> +	shrink->seeks		= 0;
> +	shrink->count_objects	= bch2_btree_key_cache_count;
> +	shrink->scan_objects	= bch2_btree_key_cache_scan;
> +	shrink->private_data	= c;
> +	shrinker_register(shrink);
>   	return 0;
>   }
>   
> diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h
> index 70398aaa095e..fac0abdaf167 100644
> --- a/fs/bcachefs/btree_types.h
> +++ b/fs/bcachefs/btree_types.h
> @@ -163,7 +163,7 @@ struct btree_cache {
>   	unsigned		used;
>   	unsigned		reserve;
>   	atomic_t		dirty;
> -	struct shrinker		shrink;
> +	struct shrinker		*shrink;
>   
>   	/*
>   	 * If we need to allocate memory for a new btree node and that
> @@ -321,7 +321,7 @@ struct btree_key_cache {
>   	bool			table_init_done;
>   	struct list_head	freed_pcpu;
>   	struct list_head	freed_nonpcpu;
> -	struct shrinker		shrink;
> +	struct shrinker		*shrink;
>   	unsigned		shrink_iter;
>   	struct btree_key_cache_freelist __percpu *pcpu_freed;
>   
> diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
> index 48431700b83e..bdc8573631bd 100644
> --- a/fs/bcachefs/fs.c
> +++ b/fs/bcachefs/fs.c
> @@ -1885,7 +1885,7 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
>   		sb->s_flags	|= SB_POSIXACL;
>   #endif
>   
> -	sb->s_shrink.seeks = 0;
> +	sb->s_shrink->seeks = 0;
>   
>   	vinode = bch2_vfs_inode_get(c, BCACHEFS_ROOT_SUBVOL_INUM);
>   	ret = PTR_ERR_OR_ZERO(vinode);
> diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c
> index 41c6900c34c1..a9f480c26bb4 100644
> --- a/fs/bcachefs/sysfs.c
> +++ b/fs/bcachefs/sysfs.c
> @@ -522,7 +522,7 @@ STORE(bch2_fs)
>   
>   		sc.gfp_mask = GFP_KERNEL;
>   		sc.nr_to_scan = strtoul_or_return(buf);
> -		c->btree_cache.shrink.scan_objects(&c->btree_cache.shrink, &sc);
> +		c->btree_cache.shrink->scan_objects(c->btree_cache.shrink, &sc);
>   	}
>   
>   	if (attr == &sysfs_btree_wakeup)

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-13  1:10     ` Qi Zheng
@ 2023-09-13 20:23       ` Andrew Morton
  2023-09-13 22:31         ` Stephen Rothwell
  0 siblings, 1 reply; 20+ messages in thread
From: Andrew Morton @ 2023-09-13 20:23 UTC (permalink / raw)
  To: Qi Zheng
  Cc: Stephen Rothwell, Kent Overstreet, Kent Overstreet,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, 13 Sep 2023 09:10:11 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:

> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Tue, 12 Sep 2023 11:27:22 +1000
> > Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >   fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
> >   fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
> >   fs/bcachefs/btree_types.h     |  4 ++--
> >   fs/bcachefs/fs.c              |  2 +-
> >   fs/bcachefs/sysfs.c           |  2 +-
> >   5 files changed, 28 insertions(+), 23 deletions(-)
> 
> This version looks good to me.
> 
> Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>

I not longer carry a post-linux-next patch queue, so there's nothing I
can do with this patch.  I'll assume that either Kent or I will merge
it later, depending upon whose stuff goes into mainline first.


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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-12  2:04 linux-next: build failure after merge of the bcachefs tree Stephen Rothwell
  2023-09-12  2:47 ` Qi Zheng
@ 2023-09-13 22:14 ` Stephen Rothwell
  1 sibling, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-09-13 22:14 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Kent Overstreet, Andrew Morton, Qi Zheng,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

Hi all,

On Tue, 12 Sep 2023 12:04:29 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> After merging the bcachefs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_exit':
> fs/bcachefs/btree_cache.c:403:9: error: implicit declaration of function 'unregister_shrinker'; did you mean 'unregister_chrdev'? [-Werror=implicit-function-declaration]
>   403 |         unregister_shrinker(&bc->shrink);
>       |         ^~~~~~~~~~~~~~~~~~~
>       |         unregister_chrdev
> fs/bcachefs/btree_cache.c: In function 'bch2_fs_btree_cache_init':
> fs/bcachefs/btree_cache.c:479:15: error: implicit declaration of function 'register_shrinker'; did you mean 'register_chrdev'? [-Werror=implicit-function-declaration]
>   479 |         ret = register_shrinker(&bc->shrink, "%s/btree_cache", c->name);
>       |               ^~~~~~~~~~~~~~~~~
>       |               register_chrdev
> cc1: all warnings being treated as errors
> 
> Caused by commits
> 
>   5ec30115c066 ("bcachefs: Initial commit")
> 
> interacting with commit
> 
>   eba045d9350d ("mm: shrinker: remove old APIs")
> 
> from v6.6-rc1.

This latter commit is actually in the mm tree and is now commit

  d3ed57149dec ("mm: shrinker: remove old APIs")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-13 20:23       ` Andrew Morton
@ 2023-09-13 22:31         ` Stephen Rothwell
  2023-11-01  0:32           ` Stephen Rothwell
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2023-09-13 22:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Qi Zheng, Kent Overstreet, Kent Overstreet,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

Hi Andrew,

On Wed, 13 Sep 2023 13:23:30 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 13 Sep 2023 09:10:11 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:
> 
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Tue, 12 Sep 2023 11:27:22 +1000
> > > Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > ---
> > >   fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
> > >   fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
> > >   fs/bcachefs/btree_types.h     |  4 ++--
> > >   fs/bcachefs/fs.c              |  2 +-
> > >   fs/bcachefs/sysfs.c           |  2 +-
> > >   5 files changed, 28 insertions(+), 23 deletions(-)  
> > 
> > This version looks good to me.
> > 
> > Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>  
> 
> I not longer carry a post-linux-next patch queue, so there's nothing I
> can do with this patch.  I'll assume that either Kent or I will merge
> it later, depending upon whose stuff goes into mainline first.

Actually the correct plan is for you and Kent to inform Linus of the
need for this patch as part of the merge resolution when he merges the
latter of your trees (unless you want to stabilise the shrinker changes
into a separate branch that is never rewritten and is merged into your
tree and the bcachefs tree).

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-09-13 22:31         ` Stephen Rothwell
@ 2023-11-01  0:32           ` Stephen Rothwell
  2023-11-01  0:53             ` Kent Overstreet
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2023-11-01  0:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Qi Zheng, Kent Overstreet, Kent Overstreet,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]

Hi Andrew,

On Thu, 14 Sep 2023 08:31:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 13 Sep 2023 13:23:30 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Wed, 13 Sep 2023 09:10:11 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:
> >   
> > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Date: Tue, 12 Sep 2023 11:27:22 +1000
> > > > Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> > > > 
> > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > ---
> > > >   fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
> > > >   fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
> > > >   fs/bcachefs/btree_types.h     |  4 ++--
> > > >   fs/bcachefs/fs.c              |  2 +-
> > > >   fs/bcachefs/sysfs.c           |  2 +-
> > > >   5 files changed, 28 insertions(+), 23 deletions(-)    
> > > 
> > > This version looks good to me.
> > > 
> > > Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>    
> > 
> > I not longer carry a post-linux-next patch queue, so there's nothing I
> > can do with this patch.  I'll assume that either Kent or I will merge
> > it later, depending upon whose stuff goes into mainline first.  
> 
> Actually the correct plan is for you and Kent to inform Linus of the
> need for this patch as part of the merge resolution when he merges the
> latter of your trees (unless you want to stabilise the shrinker changes
> into a separate branch that is never rewritten and is merged into your
> tree and the bcachefs tree).

This is now a conflict between the mm-stable tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-11-01  0:32           ` Stephen Rothwell
@ 2023-11-01  0:53             ` Kent Overstreet
  2023-11-01  1:14               ` Stephen Rothwell
  0 siblings, 1 reply; 20+ messages in thread
From: Kent Overstreet @ 2023-11-01  0:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Qi Zheng, Kent Overstreet,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Nov 01, 2023 at 11:32:22AM +1100, Stephen Rothwell wrote:
> Hi Andrew,
> 
> On Thu, 14 Sep 2023 08:31:45 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Wed, 13 Sep 2023 13:23:30 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > On Wed, 13 Sep 2023 09:10:11 +0800 Qi Zheng <zhengqi.arch@bytedance.com> wrote:
> > >   
> > > > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > Date: Tue, 12 Sep 2023 11:27:22 +1000
> > > > > Subject: [PATCH] bcachefs: convert to dynamically allocated shrinkers
> > > > > 
> > > > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > > ---
> > > > >   fs/bcachefs/btree_cache.c     | 22 ++++++++++++----------
> > > > >   fs/bcachefs/btree_key_cache.c | 21 ++++++++++++---------
> > > > >   fs/bcachefs/btree_types.h     |  4 ++--
> > > > >   fs/bcachefs/fs.c              |  2 +-
> > > > >   fs/bcachefs/sysfs.c           |  2 +-
> > > > >   5 files changed, 28 insertions(+), 23 deletions(-)    
> > > > 
> > > > This version looks good to me.
> > > > 
> > > > Reviewed-by: Qi Zheng <zhengqi.arch@bytedance.com>    
> > > 
> > > I not longer carry a post-linux-next patch queue, so there's nothing I
> > > can do with this patch.  I'll assume that either Kent or I will merge
> > > it later, depending upon whose stuff goes into mainline first.  
> > 
> > Actually the correct plan is for you and Kent to inform Linus of the
> > need for this patch as part of the merge resolution when he merges the
> > latter of your trees (unless you want to stabilise the shrinker changes
> > into a separate branch that is never rewritten and is merged into your
> > tree and the bcachefs tree).
> 
> This is now a conflict between the mm-stable tree and Linus' tree.

Is/was there a procedure for me here?

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2023-11-01  0:53             ` Kent Overstreet
@ 2023-11-01  1:14               ` Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-11-01  1:14 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Andrew Morton, Qi Zheng, Kent Overstreet,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

Hi Kent,

On Tue, 31 Oct 2023 20:53:07 -0400 Kent Overstreet <kent.overstreet@linux.dev> wrote:
> 
> Is/was there a procedure for me here?

You should have mentioned it in your pull request to Linus (in case he
merged Andrew's tree first (I don't know if you did).  And presumably
Andrew will mention it in his pull request to Linus.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-14  0:29   ` Kent Overstreet
  2024-02-14  0:39     ` Darrick J. Wong
@ 2024-02-14  1:09     ` Kees Cook
  1 sibling, 0 replies; 20+ messages in thread
From: Kees Cook @ 2024-02-14  1:09 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Darrick J. Wong

On Tue, Feb 13, 2024 at 07:29:32PM -0500, Kent Overstreet wrote:
> On Tue, Feb 13, 2024 at 04:16:34PM -0800, Kees Cook wrote:
> > On Mon, Feb 12, 2024 at 10:54:56AM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the bcachefs tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > ERROR: modpost: missing MODULE_LICENSE() in lib/thread_with_file.o
> > > ERROR: modpost: "stdio_redirect_vprintf" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "thread_with_file_exit" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "run_thread_with_stdio" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__darray_resize_slowpath" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "stdio_redirect_readline" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "run_thread_with_file" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__darray_resize_slowpath" [lib/thread_with_file.ko] undefined!
> > > 
> > > Caused by commit
> > > 
> > >   f894f9e5f0ad ("thread_with_file: Lift from bcachefs")
> > > 
> > > I have used the version of bcachefs from next-20240206 again.
> > 
> > I've mentioned this before, but this patch (and I assume others) was not
> > posted to any mailing list before it appeared in -next. This process
> > failure really needs to be fixed. Please post _everything_ going into
> > your tree to at least linux-bcachefs mailing list, and for things that
> > toss stuff into lib/ it really needs to go to lkml too and CCed to some
> > subset of people who have touched lib/Kconfig, etc last.
> 
> thread_wih_file definitely was; the patch moving it to lib/ might not
> have, I'd have to check.
> 
> We're having ongoing discussions among us fs developers about how to do
> patch review, and the emerging consensus seems to be that we actually
> don't want to spam the list with every patch (because not every patch is
> interesting!) - we don't want the human-to-human interaction to be
> drowned out on the list.

Then at least CC lkml. Sending to a mailing list isn't optional -- this
is required for Linux development. It's the basis for patch review, how
b4 operates, how tooling finds threads to respond to, etc. It has to go
_somewhere_ before it lands in -next. And using get_maintainers.pl is
the right thing for this -- it'll find the people to CC based on the
MAINTAINERS file, which means more than just file paths, there are "K:"
entries too (e.g. I am CCed on anything using seccomp). This really
needs to happen or you're going to be landing code that didn't get
reviewed fully.

> That doesn't mean we're not doing code review, though! We're
> experimenting with different workflows, there's different thoughts out
> there right now.

If that's true, I would expect to see some "Reviewed-by:" tags, which I
don't see on the patch I mentioned.

The netdev folks have a significantly higher through-put on patches, and
they check all these boxes. Their CI even verifies that emailed patches
are corrected CCed to all expected get_maintainers.pl output, runs
checkpatch, etc. Please please fix this process.

> Regarding CCing people who have touched lib/Kconfig - you sure that's
> the best way to get interested parties who'll do real review? I would
> think review from the people actively working with and using that code
> would be more valuable - that's Darrick, in this instance.

Eh, get_maintainers is usually fine. But adding something new in lib/
means more than fs people are going to be using/changing it, so get
their review early.

-Kees

-- 
Kees Cook

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-14  0:29   ` Kent Overstreet
@ 2024-02-14  0:39     ` Darrick J. Wong
  2024-02-14  1:09     ` Kees Cook
  1 sibling, 0 replies; 20+ messages in thread
From: Darrick J. Wong @ 2024-02-14  0:39 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Kees Cook, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Feb 13, 2024 at 07:29:32PM -0500, Kent Overstreet wrote:
> On Tue, Feb 13, 2024 at 04:16:34PM -0800, Kees Cook wrote:
> > On Mon, Feb 12, 2024 at 10:54:56AM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the bcachefs tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > ERROR: modpost: missing MODULE_LICENSE() in lib/thread_with_file.o
> > > ERROR: modpost: "stdio_redirect_vprintf" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "thread_with_file_exit" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "run_thread_with_stdio" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__darray_resize_slowpath" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "stdio_redirect_readline" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "run_thread_with_file" [fs/bcachefs/bcachefs.ko] undefined!
> > > ERROR: modpost: "__darray_resize_slowpath" [lib/thread_with_file.ko] undefined!
> > > 
> > > Caused by commit
> > > 
> > >   f894f9e5f0ad ("thread_with_file: Lift from bcachefs")
> > > 
> > > I have used the version of bcachefs from next-20240206 again.
> > 
> > I've mentioned this before, but this patch (and I assume others) was not
> > posted to any mailing list before it appeared in -next. This process
> > failure really needs to be fixed. Please post _everything_ going into
> > your tree to at least linux-bcachefs mailing list, and for things that
> > toss stuff into lib/ it really needs to go to lkml too and CCed to some
> > subset of people who have touched lib/Kconfig, etc last.
> 
> thread_wih_file definitely was; the patch moving it to lib/ might not
> have, I'd have to check.
> 
> We're having ongoing discussions among us fs developers about how to do
> patch review, and the emerging consensus seems to be that we actually
> don't want to spam the list with every patch (because not every patch is
> interesting!) - we don't want the human-to-human interaction to be
> drowned out on the list.
> 
> That doesn't mean we're not doing code review, though! We're
> experimenting with different workflows, there's different thoughts out
> there right now.
> 
> Regarding CCing people who have touched lib/Kconfig - you sure that's
> the best way to get interested parties who'll do real review? I would
> think review from the people actively working with and using that code
> would be more valuable - that's Darrick, in this instance.

Heh, I hadn't realized that the twf lift had already gone to -next.

I just sent a bunch more fixes:
https://lore.kernel.org/linux-bcachefs/170785143225.984170.828418190611017982.stg-ugh@frogsfrogsfrogs/T/#u

Though I guess in the haze of ~700 patches I forgot that I'd added the
module annotations to one of Kent's patches:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?h=twf-cleanups&id=d980d2d451debda0e52868382fee32273e2946ae

--D

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-14  0:16 ` Kees Cook
@ 2024-02-14  0:29   ` Kent Overstreet
  2024-02-14  0:39     ` Darrick J. Wong
  2024-02-14  1:09     ` Kees Cook
  0 siblings, 2 replies; 20+ messages in thread
From: Kent Overstreet @ 2024-02-14  0:29 UTC (permalink / raw)
  To: Kees Cook
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Darrick J. Wong

On Tue, Feb 13, 2024 at 04:16:34PM -0800, Kees Cook wrote:
> On Mon, Feb 12, 2024 at 10:54:56AM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the bcachefs tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > ERROR: modpost: missing MODULE_LICENSE() in lib/thread_with_file.o
> > ERROR: modpost: "stdio_redirect_vprintf" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "thread_with_file_exit" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "run_thread_with_stdio" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "__darray_resize_slowpath" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "stdio_redirect_readline" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "run_thread_with_file" [fs/bcachefs/bcachefs.ko] undefined!
> > ERROR: modpost: "__darray_resize_slowpath" [lib/thread_with_file.ko] undefined!
> > 
> > Caused by commit
> > 
> >   f894f9e5f0ad ("thread_with_file: Lift from bcachefs")
> > 
> > I have used the version of bcachefs from next-20240206 again.
> 
> I've mentioned this before, but this patch (and I assume others) was not
> posted to any mailing list before it appeared in -next. This process
> failure really needs to be fixed. Please post _everything_ going into
> your tree to at least linux-bcachefs mailing list, and for things that
> toss stuff into lib/ it really needs to go to lkml too and CCed to some
> subset of people who have touched lib/Kconfig, etc last.

thread_wih_file definitely was; the patch moving it to lib/ might not
have, I'd have to check.

We're having ongoing discussions among us fs developers about how to do
patch review, and the emerging consensus seems to be that we actually
don't want to spam the list with every patch (because not every patch is
interesting!) - we don't want the human-to-human interaction to be
drowned out on the list.

That doesn't mean we're not doing code review, though! We're
experimenting with different workflows, there's different thoughts out
there right now.

Regarding CCing people who have touched lib/Kconfig - you sure that's
the best way to get interested parties who'll do real review? I would
think review from the people actively working with and using that code
would be more valuable - that's Darrick, in this instance.

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-11 23:54 Stephen Rothwell
@ 2024-02-14  0:16 ` Kees Cook
  2024-02-14  0:29   ` Kent Overstreet
  0 siblings, 1 reply; 20+ messages in thread
From: Kees Cook @ 2024-02-14  0:16 UTC (permalink / raw)
  To: Stephen Rothwell, Kent Overstreet
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Feb 12, 2024 at 10:54:56AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the bcachefs tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> ERROR: modpost: missing MODULE_LICENSE() in lib/thread_with_file.o
> ERROR: modpost: "stdio_redirect_vprintf" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "thread_with_file_exit" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "run_thread_with_stdio" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "__darray_resize_slowpath" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "stdio_redirect_readline" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "run_thread_with_file" [fs/bcachefs/bcachefs.ko] undefined!
> ERROR: modpost: "__darray_resize_slowpath" [lib/thread_with_file.ko] undefined!
> 
> Caused by commit
> 
>   f894f9e5f0ad ("thread_with_file: Lift from bcachefs")
> 
> I have used the version of bcachefs from next-20240206 again.

I've mentioned this before, but this patch (and I assume others) was not
posted to any mailing list before it appeared in -next. This process
failure really needs to be fixed. Please post _everything_ going into
your tree to at least linux-bcachefs mailing list, and for things that
toss stuff into lib/ it really needs to go to lkml too and CCed to some
subset of people who have touched lib/Kconfig, etc last.

And, as mentioned before, checkpatch.pl absolutely screams about this
commit. Lots of code style issues (unnamed arguments in declarations,
variables defined in the middle of function bodies, etc). Please adjust
these things so it's easier for other maintainers to work with and on
this code. :)

-Kees

-- 
Kees Cook

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

* linux-next: build failure after merge of the bcachefs tree
@ 2024-02-11 23:54 Stephen Rothwell
  2024-02-14  0:16 ` Kees Cook
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2024-02-11 23:54 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hi all,

After merging the bcachefs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: modpost: missing MODULE_LICENSE() in lib/thread_with_file.o
ERROR: modpost: "stdio_redirect_vprintf" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "thread_with_file_exit" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "run_thread_with_stdio" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "__darray_resize_slowpath" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "stdio_redirect_readline" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "run_thread_with_file" [fs/bcachefs/bcachefs.ko] undefined!
ERROR: modpost: "__darray_resize_slowpath" [lib/thread_with_file.ko] undefined!

Caused by commit

  f894f9e5f0ad ("thread_with_file: Lift from bcachefs")

I have used the version of bcachefs from next-20240206 again.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-08 22:46 ` Stephen Rothwell
@ 2024-02-08 23:59   ` Kent Overstreet
  0 siblings, 0 replies; 20+ messages in thread
From: Kent Overstreet @ 2024-02-08 23:59 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Darrick J. Wong

On Fri, Feb 09, 2024 at 09:46:15AM +1100, Stephen Rothwell wrote:
> > Caused by commit
> > 
> >   cfca113ae06c ("mean_and_variance: put struct mean_and_variance_weighted on a diet")
> > 
> > I have used the bcachefs tree from next-20240206 for today.
> 
> I am still getting this failure.

Apologies - should be fixed now

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

* Re: linux-next: build failure after merge of the bcachefs tree
  2024-02-07  0:57 Stephen Rothwell
@ 2024-02-08 22:46 ` Stephen Rothwell
  2024-02-08 23:59   ` Kent Overstreet
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2024-02-08 22:46 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Darrick J. Wong

[-- Attachment #1: Type: text/plain, Size: 60787 bytes --]

Hi all,

On Wed, 7 Feb 2024 11:57:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> After merging the bcachefs tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> lib/math/mean_and_variance_test.c: In function 'mean_and_variance_weighted_test':
> lib/math/mean_and_variance_test.c:33:50: error: 'struct mean_and_variance_weighted' has no member named 'weight'
>    33 |         struct mean_and_variance_weighted s = { .weight = 2 };
>       |                                                  ^~~~~~
> lib/math/mean_and_variance_test.c:35:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    35 |         mean_and_variance_weighted_update(&s, 10);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from lib/math/mean_and_variance_test.c:3:
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from lib/math/mean_and_variance_test.c:2:
> lib/math/mean_and_variance_test.c:36:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:36:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:36:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:36:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:37:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:37:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:37:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:37:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:39:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    39 |         mean_and_variance_weighted_update(&s, 20);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:40:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:40:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:40:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:40:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:41:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:41:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:41:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:41:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:43:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    43 |         mean_and_variance_weighted_update(&s, 30);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:44:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:44:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:44:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:44:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:45:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:45:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:47:52: error: 'struct mean_and_variance_weighted' has no member named 'weight'
>    47 |         s = (struct mean_and_variance_weighted) { .weight = 2 };
>       |                                                    ^~~~~~
> lib/math/mean_and_variance_test.c:49:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    49 |         mean_and_variance_weighted_update(&s, -10);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:50:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:50:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:50:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:50:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:51:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:51:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:51:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:51:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:53:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    53 |         mean_and_variance_weighted_update(&s, -20);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:54:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:54:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:54:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:54:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:55:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:55:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:55:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:55:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:57:9: error: too few arguments to function 'mean_and_variance_weighted_update'
>    57 |         mean_and_variance_weighted_update(&s, -30);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:58:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:58:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:58:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:58:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:59:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:59:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:59:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:59:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c: In function 'mean_and_variance_weighted_advanced_test':
> lib/math/mean_and_variance_test.c:64:50: error: 'struct mean_and_variance_weighted' has no member named 'weight'
>    64 |         struct mean_and_variance_weighted s = { .weight = 8 };
>       |                                                  ^~~~~~
> lib/math/mean_and_variance_test.c:68:17: error: too few arguments to function 'mean_and_variance_weighted_update'
>    68 |                 mean_and_variance_weighted_update(&s, i);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:70:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:70:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:70:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:70:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:71:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:71:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:71:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:71:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:73:52: error: 'struct mean_and_variance_weighted' has no member named 'weight'
>    73 |         s = (struct mean_and_variance_weighted) { .weight = 8 };
>       |                                                    ^~~~~~
> lib/math/mean_and_variance_test.c:76:17: error: too few arguments to function 'mean_and_variance_weighted_update'
>    76 |                 mean_and_variance_weighted_update(&s, i);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:78:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:78:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:78:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>    78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:78:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:79:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:79:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:79:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
>    79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:79:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>    79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
>       |         ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:198:5: note: declared here
>   198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c: In function 'do_mean_and_variance_test':
> lib/math/mean_and_variance_test.c:94:51: error: 'struct mean_and_variance_weighted' has no member named 'weight'
>    94 |         struct mean_and_variance_weighted vw = { .weight = weight };
>       |                                                   ^~~~~~
> lib/math/mean_and_variance_test.c:98:17: error: too few arguments to function 'mean_and_variance_weighted_update'
>    98 |                 mean_and_variance_weighted_update(&vw, initial_value);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:102:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>   102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:102:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:102:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>   102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:102:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:103:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
>   103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:103:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:200:5: note: declared here
>   200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:103:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
>   103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:103:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:200:5: note: declared here
>   200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:108:17: error: too few arguments to function 'mean_and_variance_weighted_update'
>   108 |                 mean_and_variance_weighted_update(&vw, data[i]);
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:193:6: note: declared here
>   193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:112:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>   112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:112:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:112:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
>   112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:112:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:196:5: note: declared here
>   196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:113:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
>   113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:113:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:200:5: note: declared here
>   200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:113:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
>   113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
>       |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
>   693 |         const typeof(left) __left = (left);                                    \
>       |                                      ^~~~
> include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
>   885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
>   882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
>       |         ^~~~~~~~~~~~~~~~~~~
> lib/math/mean_and_variance_test.c:113:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
>   113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
>       |                 ^~~~~~~~~~~~~~~
> include/linux/mean_and_variance.h:200:5: note: declared here
>   200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   cfca113ae06c ("mean_and_variance: put struct mean_and_variance_weighted on a diet")
> 
> I have used the bcachefs tree from next-20240206 for today.

I am still getting this failure.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bcachefs tree
@ 2024-02-07  0:57 Stephen Rothwell
  2024-02-08 22:46 ` Stephen Rothwell
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2024-02-07  0:57 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Darrick J. Wong

[-- Attachment #1: Type: text/plain, Size: 59047 bytes --]

Hi all,

After merging the bcachefs tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

lib/math/mean_and_variance_test.c: In function 'mean_and_variance_weighted_test':
lib/math/mean_and_variance_test.c:33:50: error: 'struct mean_and_variance_weighted' has no member named 'weight'
   33 |         struct mean_and_variance_weighted s = { .weight = 2 };
      |                                                  ^~~~~~
lib/math/mean_and_variance_test.c:35:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   35 |         mean_and_variance_weighted_update(&s, 10);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/math/mean_and_variance_test.c:3:
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/math/mean_and_variance_test.c:2:
lib/math/mean_and_variance_test.c:36:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:36:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:36:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:36:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   36 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 10);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:37:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:37:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:37:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:37:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   37 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:39:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   39 |         mean_and_variance_weighted_update(&s, 20);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:40:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:40:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:40:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:40:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   40 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 12);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:41:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:41:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:41:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:41:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   41 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:43:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   43 |         mean_and_variance_weighted_update(&s, 30);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:44:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:44:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:44:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:44:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   44 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 16);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:45:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:45:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:45:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   45 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:47:52: error: 'struct mean_and_variance_weighted' has no member named 'weight'
   47 |         s = (struct mean_and_variance_weighted) { .weight = 2 };
      |                                                    ^~~~~~
lib/math/mean_and_variance_test.c:49:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   49 |         mean_and_variance_weighted_update(&s, -10);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:50:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:50:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:50:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:50:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   50 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -10);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:51:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:51:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:51:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:51:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   51 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 0);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:53:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   53 |         mean_and_variance_weighted_update(&s, -20);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:54:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:54:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:54:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:54:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   54 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -12);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:55:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:55:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:55:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:55:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   55 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 18);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:57:9: error: too few arguments to function 'mean_and_variance_weighted_update'
   57 |         mean_and_variance_weighted_update(&s, -30);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:58:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:58:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:58:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:58:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   58 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -16);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:59:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:59:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:59:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:59:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   59 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 72);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c: In function 'mean_and_variance_weighted_advanced_test':
lib/math/mean_and_variance_test.c:64:50: error: 'struct mean_and_variance_weighted' has no member named 'weight'
   64 |         struct mean_and_variance_weighted s = { .weight = 8 };
      |                                                  ^~~~~~
lib/math/mean_and_variance_test.c:68:17: error: too few arguments to function 'mean_and_variance_weighted_update'
   68 |                 mean_and_variance_weighted_update(&s, i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:70:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:70:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:70:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:70:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   70 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), 11);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:71:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:71:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:71:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:71:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   71 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:73:52: error: 'struct mean_and_variance_weighted' has no member named 'weight'
   73 |         s = (struct mean_and_variance_weighted) { .weight = 8 };
      |                                                    ^~~~~~
lib/math/mean_and_variance_test.c:76:17: error: too few arguments to function 'mean_and_variance_weighted_update'
   76 |                 mean_and_variance_weighted_update(&s, i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:78:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:78:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:78:31: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
   78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:78:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   78 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(s), -11);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:79:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:79:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:79:31: error: too few arguments to function 'mean_and_variance_weighted_get_variance'
   79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:79:9: note: in expansion of macro 'KUNIT_EXPECT_EQ'
   79 |         KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_variance(s), 107);
      |         ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:198:5: note: declared here
  198 | u64 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c: In function 'do_mean_and_variance_test':
lib/math/mean_and_variance_test.c:94:51: error: 'struct mean_and_variance_weighted' has no member named 'weight'
   94 |         struct mean_and_variance_weighted vw = { .weight = weight };
      |                                                   ^~~~~~
lib/math/mean_and_variance_test.c:98:17: error: too few arguments to function 'mean_and_variance_weighted_update'
   98 |                 mean_and_variance_weighted_update(&vw, initial_value);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:102:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
  102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:102:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:102:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
  102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:102:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  102 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  initial_value);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:103:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
  103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:103:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:200:5: note: declared here
  200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:103:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
  103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:103:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  103 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),0);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:200:5: note: declared here
  200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:108:17: error: too few arguments to function 'mean_and_variance_weighted_update'
  108 |                 mean_and_variance_weighted_update(&vw, data[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:193:6: note: declared here
  193 | void mean_and_variance_weighted_update(struct mean_and_variance_weighted *s,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:112:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
  112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:112:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:112:39: error: too few arguments to function 'mean_and_variance_weighted_get_mean'
  112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:112:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  112 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw),  weighted_mean[i]);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:196:5: note: declared here
  196 | s64 mean_and_variance_weighted_get_mean(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:113:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
  113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:22: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:113:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:200:5: note: declared here
  200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:113:39: error: too few arguments to function 'mean_and_variance_weighted_get_stddev'
  113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:693:38: note: in definition of macro 'KUNIT_BASE_BINARY_ASSERTION'
  693 |         const typeof(left) __left = (left);                                    \
      |                                      ^~~~
include/kunit/test.h:885:9: note: in expansion of macro 'KUNIT_BINARY_INT_ASSERTION'
  885 |         KUNIT_BINARY_INT_ASSERTION(test,                                       \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/kunit/test.h:882:9: note: in expansion of macro 'KUNIT_EXPECT_EQ_MSG'
  882 |         KUNIT_EXPECT_EQ_MSG(test, left, right, NULL)
      |         ^~~~~~~~~~~~~~~~~~~
lib/math/mean_and_variance_test.c:113:17: note: in expansion of macro 'KUNIT_EXPECT_EQ'
  113 |                 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw),weighted_stddev[i]);
      |                 ^~~~~~~~~~~~~~~
include/linux/mean_and_variance.h:200:5: note: declared here
  200 | u32 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

  cfca113ae06c ("mean_and_variance: put struct mean_and_variance_weighted on a diet")

I have used the bcachefs tree from next-20240206 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bcachefs tree
@ 2023-11-15 23:02 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-11-15 23:02 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Al Viro, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

Hi all,

After merging the btrfs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: modpost: "getname" [fs/bcachefs/bcachefs.ko] undefined!

Caused by commit

  6c43bd2cbe7f ("bch2_ioctl_subvolume_destroy(): fix locking")

I have used the bcachefs tree from next-20232215 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bcachefs tree
@ 2023-11-12 22:30 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-11-12 22:30 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Hi all,

After merging the bcachefs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/bcachefs/inode.c: In function 'may_delete_deleted_inode':
fs/bcachefs/inode.c:1129:43: error: 'BTREE_INSERT_NOFAIL' undeclared (first use in this function)
 1129 |                                           BTREE_INSERT_NOFAIL|
      |                                           ^~~~~~~~~~~~~~~~~~~
fs/bcachefs/inode.c:1129:43: note: each undeclared identifier is reported only once for each function it appears in
fs/bcachefs/inode.c:1130:43: error: 'BTREE_INSERT_LAZY_RW' undeclared (first use in this function)
 1130 |                                           BTREE_INSERT_LAZY_RW);
      |                                           ^~~~~~~~~~~~~~~~~~~~

Caused by commit

  4b8cc695db52 ("bcachefs: Rename BTREE_INSERT flags")

interacting with commit

  897d32dffe59 ("bcachefs: Fix missing transaction commit")

I have used the bcachefs tree from next-20231110 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2024-02-14  1:09 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12  2:04 linux-next: build failure after merge of the bcachefs tree Stephen Rothwell
2023-09-12  2:47 ` Qi Zheng
2023-09-12 23:35   ` Stephen Rothwell
2023-09-13  1:10     ` Qi Zheng
2023-09-13 20:23       ` Andrew Morton
2023-09-13 22:31         ` Stephen Rothwell
2023-11-01  0:32           ` Stephen Rothwell
2023-11-01  0:53             ` Kent Overstreet
2023-11-01  1:14               ` Stephen Rothwell
2023-09-13 22:14 ` Stephen Rothwell
2023-11-12 22:30 Stephen Rothwell
2023-11-15 23:02 Stephen Rothwell
2024-02-07  0:57 Stephen Rothwell
2024-02-08 22:46 ` Stephen Rothwell
2024-02-08 23:59   ` Kent Overstreet
2024-02-11 23:54 Stephen Rothwell
2024-02-14  0:16 ` Kees Cook
2024-02-14  0:29   ` Kent Overstreet
2024-02-14  0:39     ` Darrick J. Wong
2024-02-14  1:09     ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).