* [brauner-vfs:b4/vfs-bdev-file 41/42] fs/ntfs3/fsntfs.c:1011:23: warning: unused variable 'bdev'
@ 2024-01-03 20:09 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-01-03 20:09 UTC (permalink / raw)
To: Christian Brauner; +Cc: llvm, oe-kbuild-all, Christian Brauner
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git b4/vfs-bdev-file
head: 81a0b5d317a5188e7e8aaf68adf070d44c7a3eea
commit: 6d26064a464a6f8ace90a2176a17bd6f853825e0 [41/42] [DRAFT] buffer: port block device access to files and get rid of bd_inode access
config: i386-buildonly-randconfig-002-20240103 (https://download.01.org/0day-ci/archive/20240104/202401040431.fnq6ljbX-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240104/202401040431.fnq6ljbX-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/oe-kbuild-all/202401040431.fnq6ljbX-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/ntfs3/fsntfs.c:1011:23: warning: unused variable 'bdev' [-Wunused-variable]
1011 | struct block_device *bdev = sb->s_bdev;
| ^~~~
fs/ntfs3/fsntfs.c:1041:23: warning: unused variable 'bdev' [-Wunused-variable]
1041 | struct block_device *bdev = sb->s_bdev;
| ^~~~
2 warnings generated.
vim +/bdev +1011 fs/ntfs3/fsntfs.c
82cae269cfa953 Konstantin Komarov 2021-08-13 1008
82cae269cfa953 Konstantin Komarov 2021-08-13 1009 int ntfs_sb_read(struct super_block *sb, u64 lbo, size_t bytes, void *buffer)
82cae269cfa953 Konstantin Komarov 2021-08-13 1010 {
82cae269cfa953 Konstantin Komarov 2021-08-13 @1011 struct block_device *bdev = sb->s_bdev;
82cae269cfa953 Konstantin Komarov 2021-08-13 1012 u32 blocksize = sb->s_blocksize;
82cae269cfa953 Konstantin Komarov 2021-08-13 1013 u64 block = lbo >> sb->s_blocksize_bits;
82cae269cfa953 Konstantin Komarov 2021-08-13 1014 u32 off = lbo & (blocksize - 1);
82cae269cfa953 Konstantin Komarov 2021-08-13 1015 u32 op = blocksize - off;
82cae269cfa953 Konstantin Komarov 2021-08-13 1016
82cae269cfa953 Konstantin Komarov 2021-08-13 1017 for (; bytes; block += 1, off = 0, op = blocksize) {
6d26064a464a6f Christian Brauner 2024-01-02 1018 struct buffer_head *bh = __bread(sb->s_f_bdev, block, blocksize);
82cae269cfa953 Konstantin Komarov 2021-08-13 1019
82cae269cfa953 Konstantin Komarov 2021-08-13 1020 if (!bh)
82cae269cfa953 Konstantin Komarov 2021-08-13 1021 return -EIO;
82cae269cfa953 Konstantin Komarov 2021-08-13 1022
82cae269cfa953 Konstantin Komarov 2021-08-13 1023 if (op > bytes)
82cae269cfa953 Konstantin Komarov 2021-08-13 1024 op = bytes;
82cae269cfa953 Konstantin Komarov 2021-08-13 1025
82cae269cfa953 Konstantin Komarov 2021-08-13 1026 memcpy(buffer, bh->b_data + off, op);
82cae269cfa953 Konstantin Komarov 2021-08-13 1027
82cae269cfa953 Konstantin Komarov 2021-08-13 1028 put_bh(bh);
82cae269cfa953 Konstantin Komarov 2021-08-13 1029
82cae269cfa953 Konstantin Komarov 2021-08-13 1030 bytes -= op;
82cae269cfa953 Konstantin Komarov 2021-08-13 1031 buffer = Add2Ptr(buffer, op);
82cae269cfa953 Konstantin Komarov 2021-08-13 1032 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1033
82cae269cfa953 Konstantin Komarov 2021-08-13 1034 return 0;
82cae269cfa953 Konstantin Komarov 2021-08-13 1035 }
82cae269cfa953 Konstantin Komarov 2021-08-13 1036
:::::: The code at line 1011 was first introduced by commit
:::::: 82cae269cfa953032fbb8980a7d554d60fb00b17 fs/ntfs3: Add initialization of super block
:::::: TO: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
:::::: CC: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-03 20:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 20:09 [brauner-vfs:b4/vfs-bdev-file 41/42] fs/ntfs3/fsntfs.c:1011:23: warning: unused variable 'bdev' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox