aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdx/controller/mcdi_functions.h
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2023-09-05 16:15:24 +0000
committerDavid Sterba <[email protected]>2023-09-21 16:52:23 +0000
commitb4c639f699349880b7918b861e1bd360442ec450 (patch)
tree74feeaf575e2e9f6ef8b543847a8972e578aabb7 /drivers/cdx/controller/mcdi_functions.h
parentbtrfs: make sure to initialize start and len in find_free_dev_extent (diff)
downloadkernel-b4c639f699349880b7918b861e1bd360442ec450.tar.gz
kernel-b4c639f699349880b7918b861e1bd360442ec450.zip
btrfs: initialize start_slot in btrfs_log_prealloc_extents
Jens reported a compiler warning when using CONFIG_CC_OPTIMIZE_FOR_SIZE=y that looks like this fs/btrfs/tree-log.c: In function ‘btrfs_log_prealloc_extents’: fs/btrfs/tree-log.c:4828:23: warning: ‘start_slot’ may be used uninitialized [-Wmaybe-uninitialized] 4828 | ret = copy_items(trans, inode, dst_path, path, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4829 | start_slot, ins_nr, 1, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~ fs/btrfs/tree-log.c:4725:13: note: ‘start_slot’ was declared here 4725 | int start_slot; | ^~~~~~~~~~ The compiler is incorrect, as we only use this code when ins_len > 0, and when ins_len > 0 we have start_slot properly initialized. However we generally find the -Wmaybe-uninitialized warnings valuable, so initialize start_slot to get rid of the warning. Reported-by: Jens Axboe <[email protected]> Tested-by: Jens Axboe <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/mcdi_functions.h')
0 files changed, 0 insertions, 0 deletions