lkml.org 
[lkml]   [2018]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vfs: remove unused argument in iterate_bdevs
Hi Rakesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.15-rc7 next-20180112]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Rakesh-Pandit/vfs-remove-unused-argument-in-iterate_bdevs/20180114-215207
config: i386-randconfig-a1-01142254 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

fs/sync.c: In function 'sys_sync':
>> fs/sync.c:116:16: warning: passing argument 1 of 'iterate_bdevs' from incompatible pointer type
iterate_bdevs(fdatawrite_one_bdev);
^
In file included from fs/sync.c:8:0:
include/linux/fs.h:2475:20: note: expected 'void (*)(struct block_device *, void *)' but argument is of type 'void (*)(struct block_device *)'
static inline void iterate_bdevs(void (*f)(struct block_device *, void *))
^
fs/sync.c:117:16: warning: passing argument 1 of 'iterate_bdevs' from incompatible pointer type
iterate_bdevs(fdatawait_one_bdev);
^
In file included from fs/sync.c:8:0:
include/linux/fs.h:2475:20: note: expected 'void (*)(struct block_device *, void *)' but argument is of type 'void (*)(struct block_device *)'
static inline void iterate_bdevs(void (*f)(struct block_device *, void *))
^
fs/sync.c: In function 'do_sync_work':
fs/sync.c:133:16: warning: passing argument 1 of 'iterate_bdevs' from incompatible pointer type
iterate_bdevs(fdatawrite_one_bdev);
^
In file included from fs/sync.c:8:0:
include/linux/fs.h:2475:20: note: expected 'void (*)(struct block_device *, void *)' but argument is of type 'void (*)(struct block_device *)'
static inline void iterate_bdevs(void (*f)(struct block_device *, void *))
^
fs/sync.c:136:16: warning: passing argument 1 of 'iterate_bdevs' from incompatible pointer type
iterate_bdevs(fdatawrite_one_bdev);
^
In file included from fs/sync.c:8:0:
include/linux/fs.h:2475:20: note: expected 'void (*)(struct block_device *, void *)' but argument is of type 'void (*)(struct block_device *)'
static inline void iterate_bdevs(void (*f)(struct block_device *, void *))
^
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 2 include/linux/file.h:fdput
Cyclomatic Complexity 1 include/linux/file.h:__to_fd
Cyclomatic Complexity 1 include/linux/file.h:fdget
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_read
Cyclomatic Complexity 1 include/asm-generic/atomic-long.h:atomic_long_read
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
Cyclomatic Complexity 1 include/linux/rwsem.h:rwsem_is_locked
Cyclomatic Complexity 1 include/linux/workqueue.h:__init_work
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_work
Cyclomatic Complexity 1 include/linux/workqueue.h:schedule_work
Cyclomatic Complexity 1 include/linux/fs.h:file_inode
Cyclomatic Complexity 1 include/linux/fs.h:sb_rdonly
Cyclomatic Complexity 1 include/linux/fs.h:mark_inode_dirty_sync
Cyclomatic Complexity 1 include/linux/fs.h:iterate_bdevs
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 3 include/linux/slab.h:kmalloc
Cyclomatic Complexity 1 include/linux/writeback.h:laptop_sync_completion
Cyclomatic Complexity 1 fs/internal.h:__sync_blockdev
Cyclomatic Complexity 3 fs/sync.c:sync_fs_one_sb
Cyclomatic Complexity 2 fs/sync.c:SYSC_syncfs
Cyclomatic Complexity 1 fs/sync.c:SYSC_fsync
Cyclomatic Complexity 1 fs/sync.c:SYSC_fdatasync
Cyclomatic Complexity 17 fs/sync.c:SYSC_sync_file_range
Cyclomatic Complexity 1 fs/sync.c:SYSC_sync_file_range2
Cyclomatic Complexity 2 fs/sync.c:sync_inodes_one_sb
Cyclomatic Complexity 3 fs/sync.c:__sync_filesystem
Cyclomatic Complexity 1 fs/sync.c:fdatawait_one_bdev
Cyclomatic Complexity 1 fs/sync.c:fdatawrite_one_bdev
Cyclomatic Complexity 1 fs/sync.c:do_sync_work
Cyclomatic Complexity 4 fs/sync.c:sync_filesystem
Cyclomatic Complexity 2 fs/sync.c:sys_sync
Cyclomatic Complexity 2 fs/sync.c:emergency_sync
Cyclomatic Complexity 1 fs/sync.c:SyS_syncfs
Cyclomatic Complexity 4 fs/sync.c:vfs_fsync_range
Cyclomatic Complexity 1 fs/sync.c:vfs_fsync
Cyclomatic Complexity 2 fs/sync.c:do_fsync
Cyclomatic Complexity 1 fs/sync.c:SyS_fsync
Cyclomatic Complexity 1 fs/sync.c:SyS_fdatasync
Cyclomatic Complexity 1 fs/sync.c:SyS_sync_file_range
Cyclomatic Complexity 1 fs/sync.c:SyS_sync_file_range2

vim +/iterate_bdevs +116 fs/sync.c

97
98 /*
99 * Sync everything. We start by waking flusher threads so that most of
100 * writeback runs on all devices in parallel. Then we sync all inodes reliably
101 * which effectively also waits for all flusher threads to finish doing
102 * writeback. At this point all data is on disk so metadata should be stable
103 * and we tell filesystems to sync their metadata via ->sync_fs() calls.
104 * Finally, we writeout all block devices because some filesystems (e.g. ext2)
105 * just write metadata (such as inodes or bitmaps) to block device page cache
106 * and do not sync it on their own in ->sync_fs().
107 */
108 SYSCALL_DEFINE0(sync)
109 {
110 int nowait = 0, wait = 1;
111
112 wakeup_flusher_threads(WB_REASON_SYNC);
113 iterate_supers(sync_inodes_one_sb, NULL);
114 iterate_supers(sync_fs_one_sb, &nowait);
115 iterate_supers(sync_fs_one_sb, &wait);
> 116 iterate_bdevs(fdatawrite_one_bdev);
117 iterate_bdevs(fdatawait_one_bdev);
118 if (unlikely(laptop_mode))
119 laptop_sync_completion();
120 return 0;
121 }
122

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-01-14 23:27    [W:0.095 / U:2.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site