* [hch-misc:btrfs-bio-cleanup-part3 150/174] fs/btrfs/extent_io.c:7351:11: warning: Uninitialized variable: eb->start [uninitvar]
@ 2022-04-23 14:57 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-23 14:57 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4316 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: David Sterba <dsterba@suse.com>
tree: git://git.infradead.org/users/hch/misc.git btrfs-bio-cleanup-part3
head: 50401c1bd218c77092656710b2fc11b3b246679f
commit: 729304c6cee94973c16115c985ba32a665bfacca [150/174] btrfs: Turn fs_info member buffer_radix into XArray
:::::: branch date: 9 hours ago
:::::: commit date: 17 hours ago
compiler: microblaze-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 729304c6cee94973c16115c985ba32a665bfacca
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
^
fs/btrfs/extent_io.c:5984:7: warning: Local variable 'ret' shadows outer variable [shadowVariable]
int ret;
^
fs/btrfs/extent_io.c:5963:6: note: Shadowed declaration
int ret;
^
fs/btrfs/extent_io.c:5984:7: note: Shadow variable
int ret;
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
^
fs/btrfs/extent_io.c:381:26: warning: Parameter 'p_in' can be declared with const [constParameter]
struct rb_node ***p_in,
^
fs/btrfs/extent_io.c:382:25: warning: Parameter 'parent_in' can be declared with const [constParameter]
struct rb_node **parent_in)
^
fs/btrfs/extent_io.c:1835:30: warning: Parameter 'mapping' can be declared with const [constParameter]
struct address_space *mapping,
^
fs/btrfs/extent_io.c:1836:40: warning: Parameter 'locked_page' can be declared with const [constParameter]
struct page *page, struct page *locked_page,
^
fs/btrfs/extent_io.c:6084:16: warning: Parameter 'accessed' can be declared with const [constParameter]
struct page *accessed)
^
>> fs/btrfs/extent_io.c:7351:11: warning: Uninitialized variable: eb->start [uninitvar]
if (eb->start >= page_start + PAGE_SIZE)
^
vim +7351 fs/btrfs/extent_io.c
6af118ce51b52c Chris Mason 2008-07-22 7337
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7338 static struct extent_buffer *get_next_extent_buffer(
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7339 struct btrfs_fs_info *fs_info, struct page *page, u64 bytenr)
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7340 {
729304c6cee949 Gabriel Niebler 2022-04-21 7341 struct extent_buffer *eb;
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7342 struct extent_buffer *found = NULL;
729304c6cee949 Gabriel Niebler 2022-04-21 7343 unsigned long index;
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7344 u64 page_start = page_offset(page);
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7345
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7346 ASSERT(in_range(bytenr, page_start, PAGE_SIZE));
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7347 lockdep_assert_held(&fs_info->buffer_lock);
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7348
729304c6cee949 Gabriel Niebler 2022-04-21 7349 xa_for_each_start(&fs_info->extent_buffers, index, eb,
729304c6cee949 Gabriel Niebler 2022-04-21 7350 page_start >> fs_info->sectorsize_bits) {
729304c6cee949 Gabriel Niebler 2022-04-21 @7351 if (eb->start >= page_start + PAGE_SIZE)
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7352 /* Already beyond page end */
729304c6cee949 Gabriel Niebler 2022-04-21 7353 break;
729304c6cee949 Gabriel Niebler 2022-04-21 7354 if (eb->start >= bytenr) {
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7355 /* Found one */
729304c6cee949 Gabriel Niebler 2022-04-21 7356 found = eb;
729304c6cee949 Gabriel Niebler 2022-04-21 7357 break;
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7358 }
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7359 }
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7360 return found;
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7361 }
d1e86e3fc34f24 Qu Wenruo 2021-01-26 7362
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-23 14:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-23 14:57 [hch-misc:btrfs-bio-cleanup-part3 150/174] fs/btrfs/extent_io.c:7351:11: warning: Uninitialized variable: eb->start [uninitvar] kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.