[linux-next:master 2179/4552] fs/bcachefs/btree_key_cache.c:701:21: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long int'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e143016b56ecb0fcda5bb6026b0a25fe55274f56
commit: 0b07f462c6742128c9fcd67656fb110f2d39c4e1 [2179/4552] bcachefs: btree key cache locking improvements
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20230913/202309131826.J2HlElWs-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230913/202309131826.J2HlElWs-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309131826.J2HlElWs-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from fs/bcachefs/bcachefs.h:201,
                    from fs/bcachefs/btree_key_cache.c:2:
   fs/bcachefs/bcachefs_format.h:199:25: warning: 'p' offset 3 in 'struct bkey' isn't aligned to 4 [-Wpacked-not-aligned]
     199 |         struct bpos     p;
         |                         ^
   fs/bcachefs/bcachefs_format.h:201:25: warning: 'version' offset 27 in 'struct bkey' isn't aligned to 4 [-Wpacked-not-aligned]
     201 |         struct bversion version;
         |                         ^~~~~~~
   In file included from fs/bcachefs/btree_key_cache.c:6:
   fs/bcachefs/btree_locking.h: In function 'btree_node_lock_increment':
   fs/bcachefs/btree_locking.h:169:56: warning: implicit conversion from 'enum btree_node_locked_type' to 'enum six_lock_type' [-Wenum-conversion]
     169 |                         six_lock_increment(&b->c.lock, want);
         |                                                        ^~~~
   fs/bcachefs/btree_locking.h: In function 'btree_node_lock':
   fs/bcachefs/btree_locking.h:202:60: warning: implicit conversion from 'enum six_lock_type' to 'enum btree_node_locked_type' [-Wenum-conversion]
     202 |                 btree_node_lock_increment(trans, b, level, type) ||
         |                                                            ^~~~
   In file included from fs/bcachefs/fifo.h:5,
                    from fs/bcachefs/bcachefs.h:202:
   fs/bcachefs/btree_key_cache.c: In function 'bch2_btree_key_cache_to_text':
>> fs/bcachefs/btree_key_cache.c:701:21: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long int' [-Wformat=]
     701 |         pr_buf(out, "nr_keys:\t%zu\n",  atomic_long_read(&c->nr_keys));
         |                     ^~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         long int
   fs/bcachefs/util.h:261:34: note: in definition of macro 'pr_buf'
     261 |                                  __VA_ARGS__);                          \
         |                                  ^~~~~~~~~~~
   fs/bcachefs/btree_key_cache.c:701:34: note: format string is defined here
     701 |         pr_buf(out, "nr_keys:\t%zu\n",  atomic_long_read(&c->nr_keys));
         |                                ~~^
         |                                  |
         |                                  unsigned int
         |                                %lu
   fs/bcachefs/btree_key_cache.c:702:21: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long int' [-Wformat=]
     702 |         pr_buf(out, "nr_dirty:\t%zu\n", atomic_long_read(&c->nr_dirty));
         |                     ^~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                         |
         |                                         long int
   fs/bcachefs/util.h:261:34: note: in definition of macro 'pr_buf'
     261 |                                  __VA_ARGS__);                          \
         |                                  ^~~~~~~~~~~
   fs/bcachefs/btree_key_cache.c:702:35: note: format string is defined here
     702 |         pr_buf(out, "nr_dirty:\t%zu\n", atomic_long_read(&c->nr_dirty));
         |                                 ~~^
         |                                   |
         |                                   unsigned int
         |                                 %lu
   In file included from fs/bcachefs/bcachefs.h:203:
   fs/bcachefs/opts.h: At top level:
   fs/bcachefs/opts.h:353:30: warning: 'bch2_opts_default' defined but not used [-Wunused-const-variable=]
     353 | static const struct bch_opts bch2_opts_default = {
         |                              ^~~~~~~~~~~~~~~~~
   fs/bcachefs/opts.h:35:14: warning: 'NO_SB_OPT_MAX' defined but not used [-Wunused-const-variable=]
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         |              ^~~~~~~~~
   fs/bcachefs/bcachefs_format.h:87:25: note: in definition of macro 'LE_BITMASK'
      87 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1;      \
         |                         ^~~~
   fs/bcachefs/opts.h:35:1: note: in expansion of macro 'LE64_BITMASK'
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         | ^~~~~~~~~~~~
   fs/bcachefs/opts.h:35:14: warning: 'NO_SB_OPT_BITS' defined but not used [-Wunused-const-variable=]
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         |              ^~~~~~~~~
   fs/bcachefs/bcachefs_format.h:86:25: note: in definition of macro 'LE_BITMASK'
      86 | static const unsigned   name##_BITS = (end - offset);                   \
         |                         ^~~~
   fs/bcachefs/opts.h:35:1: note: in expansion of macro 'LE64_BITMASK'
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         | ^~~~~~~~~~~~
   fs/bcachefs/opts.h:35:14: warning: 'NO_SB_OPT_OFFSET' defined but not used [-Wunused-const-variable=]
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         |              ^~~~~~~~~
   fs/bcachefs/bcachefs_format.h:85:25: note: in definition of macro 'LE_BITMASK'
      85 | static const unsigned   name##_OFFSET = offset;                         \
         |                         ^~~~
   fs/bcachefs/opts.h:35:1: note: in expansion of macro 'LE64_BITMASK'
      35 | LE64_BITMASK(NO_SB_OPT,         struct bch_sb, flags[0], 0, 0);
         | ^~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:1771:14: warning: 'BTREE_NODE_SEQ_MAX' defined but not used [-Wunused-const-variable=]
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         |              ^~~~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:87:25: note: in definition of macro 'LE_BITMASK'
      87 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1;      \
         |                         ^~~~
   fs/bcachefs/bcachefs_format.h:1771:1: note: in expansion of macro 'LE64_BITMASK'
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         | ^~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:1771:14: warning: 'BTREE_NODE_SEQ_BITS' defined but not used [-Wunused-const-variable=]
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         |              ^~~~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:86:25: note: in definition of macro 'LE_BITMASK'
      86 | static const unsigned   name##_BITS = (end - offset);                   \
         |                         ^~~~
   fs/bcachefs/bcachefs_format.h:1771:1: note: in expansion of macro 'LE64_BITMASK'
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         | ^~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:1771:14: warning: 'BTREE_NODE_SEQ_OFFSET' defined but not used [-Wunused-const-variable=]
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         |              ^~~~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:85:25: note: in definition of macro 'LE_BITMASK'
      85 | static const unsigned   name##_OFFSET = offset;                         \
         |                         ^~~~
   fs/bcachefs/bcachefs_format.h:1771:1: note: in expansion of macro 'LE64_BITMASK'
    1771 | LE64_BITMASK(BTREE_NODE_SEQ,    struct btree_node, flags, 32, 64);
         | ^~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:1768:14: warning: 'BTREE_NODE_NEW_EXTENT_OVERWRITE_MAX' defined but not used [-Wunused-const-variable=]
    1768 | LE64_BITMASK(BTREE_NODE_NEW_EXTENT_OVERWRITE,
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:87:25: note: in definition of macro 'LE_BITMASK'
      87 | static const __u##_bits name##_MAX = (1ULL << (end - offset)) - 1;      \
         |                         ^~~~
   fs/bcachefs/bcachefs_format.h:1768:1: note: in expansion of macro 'LE64_BITMASK'
    1768 | LE64_BITMASK(BTREE_NODE_NEW_EXTENT_OVERWRITE,
         | ^~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:1768:14: warning: 'BTREE_NODE_NEW_EXTENT_OVERWRITE_BITS' defined but not used [-Wunused-const-variable=]
    1768 | LE64_BITMASK(BTREE_NODE_NEW_EXTENT_OVERWRITE,
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/bcachefs/bcachefs_format.h:86:25: note: in definition of macro 'LE_BITMASK'
      86 | static const unsigned   name##_BITS = (end - offset);                   \


vim +701 fs/bcachefs/btree_key_cache.c

   697	
   698	void bch2_btree_key_cache_to_text(struct printbuf *out, struct btree_key_cache *c)
   699	{
   700		pr_buf(out, "nr_freed:\t%zu\n",	c->nr_freed);
 > 701		pr_buf(out, "nr_keys:\t%zu\n",	atomic_long_read(&c->nr_keys));
   702		pr_buf(out, "nr_dirty:\t%zu\n",	atomic_long_read(&c->nr_dirty));
   703	}
   704	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux