From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: fs/btrfs/accessors.h:66:16: warning: 'inode_item' may be used uninitialized
Date: Tue, 23 Dec 2025 15:57:08 +0800 [thread overview]
Message-ID: <202512231533.cp9wEJws-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "likely FALSE maybe-used-uninitialized warning on old compiler"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Filipe Manana <fdmanana@suse.com>
CC: David Sterba <dsterba@suse.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b927546677c876e26eba308550207c2ddf812a43
commit: 2ac70946621ff3d90eb84d2e3b74563f4154f24c btrfs: add current log leaf, key and slot to struct walk_control
date: 3 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 3 months ago
config: um-randconfig-r112-20251223 (https://download.01.org/0day-ci/archive/20251223/202512231533.cp9wEJws-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251223/202512231533.cp9wEJws-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/r/202512231533.cp9wEJws-lkp@intel.com/
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
In file included from fs/btrfs/ctree.h:21,
from fs/btrfs/tree-log.c:12:
In function 'btrfs_inode_mode',
inlined from 'replay_one_buffer' at fs/btrfs/tree-log.c:2649:11:
>> fs/btrfs/accessors.h:66:16: warning: 'inode_item' may be used uninitialized [-Wmaybe-uninitialized]
66 | return btrfs_get_##bits(eb, s, offsetof(type, member)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/accessors.h:270:1: note: in expansion of macro 'BTRFS_SETGET_FUNCS'
270 | BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32);
| ^~~~~~~~~~~~~~~~~~
fs/btrfs/tree-log.c: In function 'replay_one_buffer':
fs/btrfs/tree-log.c:2607:42: note: 'inode_item' was declared here
2607 | struct btrfs_inode_item *inode_item;
| ^~~~~~~~~~
vim +/inode_item +66 fs/btrfs/accessors.h
07e81dc94474eb6 Josef Bacik 2022-10-19 60
07e81dc94474eb6 Josef Bacik 2022-10-19 61 #define BTRFS_SETGET_FUNCS(name, type, member, bits) \
07e81dc94474eb6 Josef Bacik 2022-10-19 62 static inline u##bits btrfs_##name(const struct extent_buffer *eb, \
07e81dc94474eb6 Josef Bacik 2022-10-19 63 const type *s) \
07e81dc94474eb6 Josef Bacik 2022-10-19 64 { \
98efb4eb310d0d7 David Sterba 2023-07-13 65 static_assert(sizeof(u##bits) == sizeof_field(type, member)); \
07e81dc94474eb6 Josef Bacik 2022-10-19 @66 return btrfs_get_##bits(eb, s, offsetof(type, member)); \
07e81dc94474eb6 Josef Bacik 2022-10-19 67 } \
07e81dc94474eb6 Josef Bacik 2022-10-19 68 static inline void btrfs_set_##name(const struct extent_buffer *eb, type *s, \
07e81dc94474eb6 Josef Bacik 2022-10-19 69 u##bits val) \
07e81dc94474eb6 Josef Bacik 2022-10-19 70 { \
98efb4eb310d0d7 David Sterba 2023-07-13 71 static_assert(sizeof(u##bits) == sizeof_field(type, member)); \
07e81dc94474eb6 Josef Bacik 2022-10-19 72 btrfs_set_##bits(eb, s, offsetof(type, member), val); \
07e81dc94474eb6 Josef Bacik 2022-10-19 73 }
07e81dc94474eb6 Josef Bacik 2022-10-19 74
:::::: The code at line 66 was first introduced by commit
:::::: 07e81dc94474eb62705c6f96d9ab1a5a797b8703 btrfs: move accessor helpers into accessors.h
:::::: TO: Josef Bacik <josef@toxicpanda.com>
:::::: CC: David Sterba <dsterba@suse.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-23 7:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202512231533.cp9wEJws-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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.