All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: wangyufei <wangyufei@vivo.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC 1/1] writeback: add sysfs to config the number of writeback contexts
Date: Thu, 13 Aug 2026 18:47:57 +0800	[thread overview]
Message-ID: <202608131809.2ZEzONCi-lkp@intel.com> (raw)
In-Reply-To: <20250825122931.13037-2-wangyufei@vivo.com>

Hi wangyufei,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v7.2-rc7 next-20260812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/wangyufei/writeback-add-sysfs-to-config-the-number-of-writeback-contexts/20260813-143259
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20250825122931.13037-2-wangyufei%40vivo.com
patch subject: [RFC 1/1] writeback: add sysfs to config the number of writeback contexts
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260813/202608131809.2ZEzONCi-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/202608131809.2ZEzONCi-lkp@intel.com/reproduce)

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

All error/warnings (new ones prefixed by >>):

   In file included from mm/filemap.c:33:
>> include/linux/backing-dev.h:118:58: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                          ^~~~~~~~~~~~~~~~~
   include/linux/backing-dev.h:119:59: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     119 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                           ^~~~~~~~~~~~~~~~~
--
   In file included from mm/page-writeback.c:26:
>> include/linux/backing-dev.h:118:58: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                          ^~~~~~~~~~~~~~~~~
   include/linux/backing-dev.h:119:59: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     119 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                           ^~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:27,
                    from mm/page-writeback.c:15:
   mm/page-writeback.c: In function '__bdi_set_wb_ctx':
>> mm/page-writeback.c:734:32: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     734 |         for (i = 0; i < min(bdi->nr_wb_ctx, nwritebacks); i++)
         |                                ^~
   include/linux/minmax.h:92:20: note: in definition of macro '__careful_cmp_once'
      92 |         auto ux = (x); auto uy = (y);                   \
         |                    ^
   include/linux/minmax.h:105:25: note: in expansion of macro '__careful_cmp'
     105 | #define min(x, y)       __careful_cmp(min, x, y)
         |                         ^~~~~~~~~~~~~
   mm/page-writeback.c:734:25: note: in expansion of macro 'min'
     734 |         for (i = 0; i < min(bdi->nr_wb_ctx, nwritebacks); i++)
         |                         ^~~
   In file included from <command-line>:
>> include/linux/compiler.h:165:17: error: '__UNIQUE_ID_x__697' undeclared (first use in this function); did you mean '__UNIQUE_ID_y__698'?
     165 |         __PASTE(__UNIQUE_ID_,                                   \
         |                 ^~~~~~~~~~~~
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
      40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:93:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      93 |         BUILD_BUG_ON_MSG(!__types_ok(ux, uy),           \
         |         ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:49:25: note: in expansion of macro 'is_signed_type'
      49 | #define __sign_use(ux) (is_signed_type(typeof(ux)) ? \
         |                         ^~~~~~~~~~~~~~
   include/linux/minmax.h:75:10: note: in expansion of macro '__sign_use'
      75 |         (__sign_use(ux) & __sign_use(uy))
         |          ^~~~~~~~~~
   include/linux/minmax.h:93:27: note: in expansion of macro '__types_ok'
      93 |         BUILD_BUG_ON_MSG(!__types_ok(ux, uy),           \
         |                           ^~~~~~~~~~
   include/linux/minmax.h:98:9: note: in expansion of macro '__careful_cmp_once'
      98 |         __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:16:23: note: in expansion of macro '___PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^~~~~~~~
   include/linux/compiler.h:165:9: note: in expansion of macro '__PASTE'
     165 |         __PASTE(__UNIQUE_ID_,                                   \
         |         ^~~~~~~
   include/linux/minmax.h:98:38: note: in expansion of macro '__UNIQUE_ID'
      98 |         __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |                                      ^~~~~~~~~~~
   include/linux/minmax.h:105:25: note: in expansion of macro '__careful_cmp'
     105 | #define min(x, y)       __careful_cmp(min, x, y)
         |                         ^~~~~~~~~~~~~
   mm/page-writeback.c:734:25: note: in expansion of macro 'min'
     734 |         for (i = 0; i < min(bdi->nr_wb_ctx, nwritebacks); i++)
         |                         ^~~
   include/linux/compiler.h:165:17: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
     682 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
     702 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
      40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:93:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      93 |         BUILD_BUG_ON_MSG(!__types_ok(ux, uy),           \
         |         ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:49:25: note: in expansion of macro 'is_signed_type'
      49 | #define __sign_use(ux) (is_signed_type(typeof(ux)) ? \
         |                         ^~~~~~~~~~~~~~
   include/linux/minmax.h:75:10: note: in expansion of macro '__sign_use'
      75 |         (__sign_use(ux) & __sign_use(uy))
         |          ^~~~~~~~~~
   include/linux/minmax.h:93:27: note: in expansion of macro '__types_ok'
      93 |         BUILD_BUG_ON_MSG(!__types_ok(ux, uy),           \
         |                           ^~~~~~~~~~
   include/linux/minmax.h:98:9: note: in expansion of macro '__careful_cmp_once'
      98 |         __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:16:23: note: in expansion of macro '___PASTE'
      16 | #define __PASTE(a, b) ___PASTE(a, b)
         |                       ^~~~~~~~
   include/linux/compiler.h:165:9: note: in expansion of macro '__PASTE'
     165 |         __PASTE(__UNIQUE_ID_,                                   \
         |         ^~~~~~~
   include/linux/minmax.h:98:38: note: in expansion of macro '__UNIQUE_ID'
      98 |         __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
         |                                      ^~~~~~~~~~~
   include/linux/minmax.h:105:25: note: in expansion of macro '__careful_cmp'
     105 | #define min(x, y)       __careful_cmp(min, x, y)
         |                         ^~~~~~~~~~~~~
   mm/page-writeback.c:734:25: note: in expansion of macro 'min'
     734 |         for (i = 0; i < min(bdi->nr_wb_ctx, nwritebacks); i++)
         |                         ^~~
>> mm/page-writeback.c:735:37: error: 'struct backing_dev_info' has no member named 'wb_ctx_arr'
     735 |                 new_ctx_arr[i] = bdi->wb_ctx_arr[i];
         |                                     ^~
   mm/page-writeback.c:737:21: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     737 |         for (i = bdi->nr_wb_ctx; i < nwritebacks; i++) {
         |                     ^~
   In file included from include/linux/workqueue.h:9,
                    from include/linux/srcu.h:21,
                    from include/linux/notifier.h:16,
                    from arch/powerpc/include/asm/uprobes.h:12,
                    from include/linux/uprobes.h:66,
                    from include/linux/mm_types.h:16,
                    from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/xarray.h:16,
                    from include/linux/list_lru.h:14,
                    from include/linux/fs/super_types.h:7,
                    from include/linux/fs/super.h:5,
                    from include/linux/fs.h:5,
                    from mm/page-writeback.c:19:
>> mm/page-writeback.c:739:40: error: invalid application of 'sizeof' to incomplete type 'struct bdi_writeback_ctx'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                                        ^~~~~~
   include/linux/alloc_tag.h:256:16: note: in definition of macro 'alloc_hooks_tag'
     256 |         typeof(_do_alloc) _res;                                         \
         |                ^~~~~~~~~
   include/linux/slab.h:1320:49: note: in expansion of macro 'alloc_hooks'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                 ^~~~~~~~~~~
   include/linux/slab.h:1320:61: note: in expansion of macro 'kzalloc_noprof'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                             ^~~~~~~~~~~~~~
   mm/page-writeback.c:739:25: note: in expansion of macro 'kzalloc'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                         ^~~~~~~
>> mm/page-writeback.c:739:40: error: invalid application of 'sizeof' to incomplete type 'struct bdi_writeback_ctx'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                                        ^~~~~~
   include/linux/alloc_tag.h:260:24: note: in definition of macro 'alloc_hooks_tag'
     260 |                 _res = _do_alloc;                                       \
         |                        ^~~~~~~~~
   include/linux/slab.h:1320:49: note: in expansion of macro 'alloc_hooks'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                 ^~~~~~~~~~~
   include/linux/slab.h:1320:61: note: in expansion of macro 'kzalloc_noprof'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                             ^~~~~~~~~~~~~~
   mm/page-writeback.c:739:25: note: in expansion of macro 'kzalloc'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                         ^~~~~~~
>> mm/page-writeback.c:739:40: error: invalid application of 'sizeof' to incomplete type 'struct bdi_writeback_ctx'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                                        ^~~~~~
   include/linux/alloc_tag.h:263:24: note: in definition of macro 'alloc_hooks_tag'
     263 |                 _res = _do_alloc;                                       \
         |                        ^~~~~~~~~
   include/linux/slab.h:1320:49: note: in expansion of macro 'alloc_hooks'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                 ^~~~~~~~~~~
   include/linux/slab.h:1320:61: note: in expansion of macro 'kzalloc_noprof'
    1320 | #define kzalloc(size, flags)                    alloc_hooks(kzalloc_noprof(size, flags))
         |                                                             ^~~~~~~~~~~~~~
   mm/page-writeback.c:739:25: note: in expansion of macro 'kzalloc'
     739 |                         kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
         |                         ^~~~~~~
>> mm/page-writeback.c:738:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     738 |                 new_ctx_arr[i] = (struct bdi_writeback_ctx *)
         |                                  ^
   mm/page-writeback.c:742:42: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     742 |                         while (--i >= bdi->nr_wb_ctx)
         |                                          ^~
>> mm/page-writeback.c:747:47: error: invalid use of undefined type 'struct bdi_writeback_ctx'
     747 |                 INIT_LIST_HEAD(&new_ctx_arr[i]->wb_list);
         |                                               ^~
   In file included from include/linux/swait.h:8,
                    from include/linux/completion.h:12,
                    from include/linux/shrinker.h:8,
                    from include/linux/list_lru.h:13:
   mm/page-writeback.c:748:52: error: invalid use of undefined type 'struct bdi_writeback_ctx'
     748 |                 init_waitqueue_head(&new_ctx_arr[i]->wb_waitq);
         |                                                    ^~
   include/linux/wait.h:68:40: note: in definition of macro 'init_waitqueue_head'
      68 |                 __init_waitqueue_head((wq_head), #wq_head, &__key);             \
         |                                        ^~~~~~~
   mm/page-writeback.c:751:21: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     751 |         for (i = bdi->nr_wb_ctx; i < nwritebacks; i++) {
         |                     ^~
>> mm/page-writeback.c:752:55: error: passing argument 2 of 'bdi_wb_ctx_init' from incompatible pointer type [-Wincompatible-pointer-types]
     752 |                 ret = bdi_wb_ctx_init(bdi, new_ctx_arr[i]);
         |                                            ~~~~~~~~~~~^~~
         |                                                       |
         |                                                       struct bdi_writeback_ctx *
   include/linux/backing-dev.h:118:77: note: expected 'struct bdi_writeback_ctx *' but argument is of type 'struct bdi_writeback_ctx *'
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
   mm/page-writeback.c:754:42: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     754 |                         while (--i >= bdi->nr_wb_ctx) {
         |                                          ^~
>> mm/page-writeback.c:755:65: error: passing argument 2 of 'bdi_wb_ctx_exit' from incompatible pointer type [-Wincompatible-pointer-types]
     755 |                                 bdi_wb_ctx_exit(bdi, new_ctx_arr[i]);
         |                                                      ~~~~~~~~~~~^~~
         |                                                                 |
         |                                                                 struct bdi_writeback_ctx *
   include/linux/backing-dev.h:119:78: note: expected 'struct bdi_writeback_ctx *' but argument is of type 'struct bdi_writeback_ctx *'
     119 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
   mm/page-writeback.c:761:50: error: invalid use of undefined type 'struct bdi_writeback_ctx'
     761 |                 list_add_tail_rcu(&new_ctx_arr[i]->wb.bdi_node, &new_ctx_arr[i]->wb_list);
         |                                                  ^~
   mm/page-writeback.c:761:80: error: invalid use of undefined type 'struct bdi_writeback_ctx'
     761 |                 list_add_tail_rcu(&new_ctx_arr[i]->wb.bdi_node, &new_ctx_arr[i]->wb_list);
         |                                                                                ^~
   mm/page-writeback.c:762:55: error: invalid use of undefined type 'struct bdi_writeback_ctx'
     762 |                 set_bit(WB_registered, &new_ctx_arr[i]->wb.state);
         |                                                       ^~
   mm/page-writeback.c:768:26: error: 'struct backing_dev_info' has no member named 'wb_ctx_arr'
     768 |         old_ctx_arr = bdi->wb_ctx_arr;
         |                          ^~
   mm/page-writeback.c:770:12: error: 'struct backing_dev_info' has no member named 'wb_ctx_arr'
     770 |         bdi->wb_ctx_arr = new_ctx_arr;
         |            ^~
   mm/page-writeback.c:771:12: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     771 |         bdi->nr_wb_ctx = nwritebacks;
         |            ^~
   mm/page-writeback.c: In function 'bdi_set_nwritebacks':
   mm/page-writeback.c:858:30: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     858 |         if (nwritebacks < bdi->nr_wb_ctx)
         |                              ^~
--
   In file included from mm/backing-dev.c:7:
>> include/linux/backing-dev.h:118:58: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                          ^~~~~~~~~~~~~~~~~
   include/linux/backing-dev.h:119:59: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
     119 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |                                                           ^~~~~~~~~~~~~~~~~
   mm/backing-dev.c: In function 'nwritebacks_show':
>> mm/backing-dev.c:465:43: error: 'struct backing_dev_info' has no member named 'nr_wb_ctx'
     465 |         return sysfs_emit(buf, "%d\n", bdi->nr_wb_ctx);
         |                                           ^~
   mm/backing-dev.c: At top level:
>> mm/backing-dev.c:1015:58: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
    1015 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |                                                          ^~~~~~~~~~~~~~~~~
>> mm/backing-dev.c:1015:5: error: conflicting types for 'bdi_wb_ctx_init'; have 'int(struct backing_dev_info *, struct bdi_writeback_ctx *)'
    1015 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |     ^~~~~~~~~~~~~~~
   include/linux/backing-dev.h:118:5: note: previous declaration of 'bdi_wb_ctx_init' with type 'int(struct backing_dev_info *, struct bdi_writeback_ctx *)'
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |     ^~~~~~~~~~~~~~~
   In file included from include/linux/fs.h:16,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/blk_types.h:10,
                    from include/linux/blkdev.h:9,
                    from mm/backing-dev.c:3:
   mm/backing-dev.c: In function 'bdi_wb_ctx_init':
>> mm/backing-dev.c:1019:36: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1019 |         INIT_RADIX_TREE(&bdi_wb_ctx->cgwb_tree, GFP_ATOMIC);
         |                                    ^~
   include/linux/radix-tree.h:84:51: note: in definition of macro 'INIT_RADIX_TREE'
      84 | #define INIT_RADIX_TREE(root, mask) xa_init_flags(root, mask)
         |                                                   ^~~~
   In file included from include/linux/mm_types.h:13,
                    from include/linux/mmzone.h:22,
                    from include/linux/gfp.h:7,
                    from include/linux/xarray.h:16,
                    from include/linux/list_lru.h:14,
                    from include/linux/fs/super_types.h:7,
                    from include/linux/fs/super.h:5,
                    from include/linux/fs.h:5:
   mm/backing-dev.c:1021:31: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1021 |         init_rwsem(&bdi_wb_ctx->wb_switch_rwsem);
         |                               ^~
   include/linux/rwsem.h:123:23: note: in definition of macro 'init_rwsem'
     123 |         __init_rwsem((sem), #sem, &__key);                      \
         |                       ^~~
   mm/backing-dev.c:1023:34: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1023 |         ret = wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                  ^~
>> mm/backing-dev.c:1023:40: error: passing argument 2 of 'wb_init' from incompatible pointer type [-Wincompatible-pointer-types]
    1023 |         ret = wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                        ^~~~~~~~~~
         |                                        |
         |                                        struct bdi_writeback_ctx *
   mm/backing-dev.c:544:71: note: expected 'struct backing_dev_info *' but argument is of type 'struct bdi_writeback_ctx *'
     544 | static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
         |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
>> mm/backing-dev.c:1023:52: error: passing argument 3 of 'wb_init' makes integer from pointer without a cast [-Wint-conversion]
    1023 |         ret = wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                                    ^~~
         |                                                    |
         |                                                    struct backing_dev_info *
   mm/backing-dev.c:545:26: note: expected 'gfp_t' {aka 'unsigned int'} but argument is of type 'struct backing_dev_info *'
     545 |                    gfp_t gfp)
         |                    ~~~~~~^~~
>> mm/backing-dev.c:1023:15: error: too many arguments to function 'wb_init'; expected 3, have 4
    1023 |         ret = wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |               ^~~~~~~
   mm/backing-dev.c:544:12: note: declared here
     544 | static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
         |            ^~~~~~~
   mm/backing-dev.c:1025:27: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1025 |                 bdi_wb_ctx->wb.memcg_css = &root_mem_cgroup->css;
         |                           ^~
   mm/backing-dev.c:1026:27: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1026 |                 bdi_wb_ctx->wb.blkcg_css = blkcg_root_css;
         |                           ^~
   mm/backing-dev.c: At top level:
   mm/backing-dev.c:1270:58: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
    1270 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |                                                          ^~~~~~~~~~~~~~~~~
   mm/backing-dev.c:1270:5: error: conflicting types for 'bdi_wb_ctx_init'; have 'int(struct backing_dev_info *, struct bdi_writeback_ctx *)'
    1270 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |     ^~~~~~~~~~~~~~~
   include/linux/backing-dev.h:118:5: note: previous declaration of 'bdi_wb_ctx_init' with type 'int(struct backing_dev_info *, struct bdi_writeback_ctx *)'
     118 | int bdi_wb_ctx_init(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |     ^~~~~~~~~~~~~~~
   mm/backing-dev.c: In function 'bdi_wb_ctx_init':
   mm/backing-dev.c:1272:35: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1272 |         return wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                   ^~
   mm/backing-dev.c:1272:41: error: passing argument 2 of 'wb_init' from incompatible pointer type [-Wincompatible-pointer-types]
    1272 |         return wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                         ^~~~~~~~~~
         |                                         |
         |                                         struct bdi_writeback_ctx *
   mm/backing-dev.c:544:71: note: expected 'struct backing_dev_info *' but argument is of type 'struct bdi_writeback_ctx *'
     544 | static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
         |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   mm/backing-dev.c:1272:53: error: passing argument 3 of 'wb_init' makes integer from pointer without a cast [-Wint-conversion]
    1272 |         return wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                                                     ^~~
         |                                                     |
         |                                                     struct backing_dev_info *
   mm/backing-dev.c:545:26: note: expected 'gfp_t' {aka 'unsigned int'} but argument is of type 'struct backing_dev_info *'
     545 |                    gfp_t gfp)
         |                    ~~~~~~^~~
   mm/backing-dev.c:1272:16: error: too many arguments to function 'wb_init'; expected 3, have 4
    1272 |         return wb_init(&bdi_wb_ctx->wb, bdi_wb_ctx, bdi, GFP_KERNEL);
         |                ^~~~~~~
   mm/backing-dev.c:544:12: note: declared here
     544 | static int wb_init(struct bdi_writeback *wb, struct backing_dev_info *bdi,
         |            ^~~~~~~
   mm/backing-dev.c: At top level:
   mm/backing-dev.c:1275:59: warning: 'struct bdi_writeback_ctx' declared inside parameter list will not be visible outside of this definition or declaration
    1275 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |                                                           ^~~~~~~~~~~~~~~~~
>> mm/backing-dev.c:1275:6: error: conflicting types for 'bdi_wb_ctx_exit'; have 'void(struct backing_dev_info *, struct bdi_writeback_ctx *)'
    1275 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx)
         |      ^~~~~~~~~~~~~~~
   include/linux/backing-dev.h:119:6: note: previous declaration of 'bdi_wb_ctx_exit' with type 'void(struct backing_dev_info *, struct bdi_writeback_ctx *)'
     119 | void bdi_wb_ctx_exit(struct backing_dev_info *bdi, struct bdi_writeback_ctx *bdi_wb_ctx);
         |      ^~~~~~~~~~~~~~~
   mm/backing-dev.c: In function 'bdi_wb_ctx_exit':
   mm/backing-dev.c:1277:32: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1277 |         wb_shutdown(&bdi_wb_ctx->wb);
         |                                ^~
>> mm/backing-dev.c:1278:9: error: too many arguments to function 'cgwb_bdi_unregister'; expected 1, have 2
    1278 |         cgwb_bdi_unregister(bdi, bdi_wb_ctx);
         |         ^~~~~~~~~~~~~~~~~~~      ~~~~~~~~~~
   mm/backing-dev.c:881:13: note: declared here
     881 | static void cgwb_bdi_unregister(struct backing_dev_info *bdi)
         |             ^~~~~~~~~~~~~~~~~~~
   In file included from arch/powerpc/include/asm/bug.h:116,
                    from include/linux/bug.h:5,
                    from include/linux/instrumented.h:10,
                    from include/asm-generic/bitops/instrumented-atomic.h:14,
                    from arch/powerpc/include/asm/bitops.h:321,
                    from include/linux/bitops.h:67,
                    from include/linux/bitmap.h:8,
                    from include/linux/nodemask.h:91,
                    from include/linux/list_lru.h:12:
   mm/backing-dev.c:1280:57: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                                                         ^~
   include/asm-generic/bug.h:120:32: note: in definition of macro 'WARN_ON_ONCE'
     120 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/bitops.h:60:41: note: in expansion of macro 'bitop'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                         ^~~~~
   mm/backing-dev.c:1280:22: note: in expansion of macro 'test_bit'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                      ^~~~~~~~
   mm/backing-dev.c:1280:57: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                                                         ^~
   include/asm-generic/bug.h:120:32: note: in definition of macro 'WARN_ON_ONCE'
     120 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/bitops.h:60:41: note: in expansion of macro 'bitop'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                         ^~~~~
   mm/backing-dev.c:1280:22: note: in expansion of macro 'test_bit'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                      ^~~~~~~~
   mm/backing-dev.c:1280:57: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                                                         ^~
   include/asm-generic/bug.h:120:32: note: in definition of macro 'WARN_ON_ONCE'
     120 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/bitops.h:60:41: note: in expansion of macro 'bitop'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                         ^~~~~
   mm/backing-dev.c:1280:22: note: in expansion of macro 'test_bit'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                      ^~~~~~~~
   mm/backing-dev.c:1280:57: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                                                         ^~
   include/asm-generic/bug.h:120:32: note: in definition of macro 'WARN_ON_ONCE'
     120 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/bitops.h:60:41: note: in expansion of macro 'bitop'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                         ^~~~~
   mm/backing-dev.c:1280:22: note: in expansion of macro 'test_bit'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                      ^~~~~~~~
   mm/backing-dev.c:1280:57: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                                                         ^~
   include/asm-generic/bug.h:120:32: note: in definition of macro 'WARN_ON_ONCE'
     120 |         int __ret_warn_on = !!(condition);                              \
         |                                ^~~~~~~~~
   include/linux/bitops.h:60:41: note: in expansion of macro 'bitop'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                         ^~~~~
   mm/backing-dev.c:1280:22: note: in expansion of macro 'test_bit'
    1280 |         WARN_ON_ONCE(test_bit(WB_registered, &bdi_wb_ctx->wb.state));
         |                      ^~~~~~~~
   mm/backing-dev.c:1281:28: error: invalid use of undefined type 'struct bdi_writeback_ctx'
    1281 |         wb_exit(&bdi_wb_ctx->wb);
         |                            ^~


vim +734 mm/page-writeback.c

   724	
   725	static int __bdi_set_wb_ctx(struct backing_dev_info *bdi, int nwritebacks)
   726	{
   727		struct bdi_writeback_ctx **new_ctx_arr, **old_ctx_arr;
   728		int i, ret;
   729	
   730		new_ctx_arr = kcalloc(nwritebacks, sizeof(struct bdi_writeback_ctx *), GFP_KERNEL);
   731		if (!new_ctx_arr)
   732			return -ENOMEM;
   733	
 > 734		for (i = 0; i < min(bdi->nr_wb_ctx, nwritebacks); i++)
 > 735			new_ctx_arr[i] = bdi->wb_ctx_arr[i];
   736	
   737		for (i = bdi->nr_wb_ctx; i < nwritebacks; i++) {
 > 738			new_ctx_arr[i] = (struct bdi_writeback_ctx *)
 > 739				kzalloc(sizeof(struct bdi_writeback_ctx), GFP_KERNEL);
   740			if (!new_ctx_arr[i]) {
   741				pr_err("Failed to allocate %d", i);
   742				while (--i >= bdi->nr_wb_ctx)
   743					kfree(new_ctx_arr[i]);
   744				kfree(new_ctx_arr);
   745				return -ENOMEM;
   746			}
 > 747			INIT_LIST_HEAD(&new_ctx_arr[i]->wb_list);
   748			init_waitqueue_head(&new_ctx_arr[i]->wb_waitq);
   749		}
   750	
   751		for (i = bdi->nr_wb_ctx; i < nwritebacks; i++) {
 > 752			ret = bdi_wb_ctx_init(bdi, new_ctx_arr[i]);
   753			if (ret) {
   754				while (--i >= bdi->nr_wb_ctx) {
 > 755					bdi_wb_ctx_exit(bdi, new_ctx_arr[i]);
   756					kfree(new_ctx_arr[i]);
   757				}
   758				kfree(new_ctx_arr);
   759				return ret;
   760			}
   761			list_add_tail_rcu(&new_ctx_arr[i]->wb.bdi_node, &new_ctx_arr[i]->wb_list);
   762			set_bit(WB_registered, &new_ctx_arr[i]->wb.state);
   763		}
   764	
   765		// Make sure the initialization is done before assignment
   766		smp_wmb();
   767	
   768		old_ctx_arr = bdi->wb_ctx_arr;
   769		spin_lock_bh(&bdi_lock);
   770		bdi->wb_ctx_arr = new_ctx_arr;
   771		bdi->nr_wb_ctx = nwritebacks;
   772		spin_unlock_bh(&bdi_lock);
   773	
   774		kfree(old_ctx_arr);
   775		return 0;
   776	}
   777	

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

  reply	other threads:[~2026-08-13 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250825123009epcas5p1573496e2cad2f58d22036493e5af03be@epcas5p1.samsung.com>
2025-08-25 12:29 ` [RFC 0/1] writeback: add sysfs to config the number of writeback contexts wangyufei
2025-08-25 12:29   ` [RFC 1/1] " wangyufei
2026-08-13 10:47     ` kernel test robot [this message]
2025-08-25 14:46   ` [RFC 0/1] " David Hildenbrand
2025-08-25 16:15     ` Matthew Wilcox
2025-08-29  8:59   ` Kundan Kumar
2025-09-02 11:19     ` wangyufei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608131809.2ZEzONCi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wangyufei@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.