[willy-pagecache:for-next 46/48] mm/shmem.c:154:5: warning: no previous prototype for 'shmem_get_folio'
by kernel test robot
tree: git://git.infradead.org/users/willy/pagecache for-next
head: 9244dddc51b5e46444a334c881372aa66138f74a
commit: 1be265f951d0eefea0f8a2aafef4dd18d8ad2719 [46/48] truncate,shmem: Handle truncates that split large folios
config: arc-randconfig-r043-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091729.kMRPshvJ-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 1be265f951d0eefea0f8a2aafef4dd18d8ad2719
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> mm/shmem.c:154:5: warning: no previous prototype for 'shmem_get_folio' [-Wmissing-prototypes]
154 | int shmem_get_folio(struct inode *inode, pgoff_t index,
| ^~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:88,
from mm/shmem.c:75:
arch/arc/include/asm/perf_event.h:126:27: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
vim +/shmem_get_folio +154 mm/shmem.c
153
> 154 int shmem_get_folio(struct inode *inode, pgoff_t index,
155 struct folio **foliop, enum sgp_type sgp)
156 {
157 struct page *page = NULL;
158 int ret = shmem_getpage(inode, index, &page, sgp);
159
160 if (page)
161 *foliop = page_folio(page);
162 else
163 *foliop = NULL;
164 return ret;
165 }
166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[willy-pagecache:for-next 42/48] fs/f2fs/f2fs.h:4057:67: warning: 'struct pagevec' declared inside parameter list will not be visible outside of this definition or declaration
by kernel test robot
tree: git://git.infradead.org/users/willy/pagecache for-next
head: 9244dddc51b5e46444a334c881372aa66138f74a
commit: 3fda3cf387c172cc9a528b6556a024627c9843de [42/48] mm: Convert find_lock_entries() to use a folio_batch
config: ia64-buildonly-randconfig-r003-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091654.Ju5aGvVd-lk...)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 3fda3cf387c172cc9a528b6556a024627c9843de
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/f2fs/dir.c:13:
>> fs/f2fs/f2fs.h:4057:67: warning: 'struct pagevec' declared inside parameter list will not be visible outside of this definition or declaration
4057 | bool f2fs_all_cluster_page_loaded(struct compress_ctx *cc, struct pagevec *pvec,
| ^~~~~~~
vim +4057 fs/f2fs/f2fs.h
4c8ff7095bef64 Chao Yu 2019-11-01 4036
4c8ff7095bef64 Chao Yu 2019-11-01 4037 /*
4c8ff7095bef64 Chao Yu 2019-11-01 4038 * compress.c
4c8ff7095bef64 Chao Yu 2019-11-01 4039 */
4c8ff7095bef64 Chao Yu 2019-11-01 4040 #ifdef CONFIG_F2FS_FS_COMPRESSION
4c8ff7095bef64 Chao Yu 2019-11-01 4041 bool f2fs_is_compressed_page(struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4042 struct page *f2fs_compress_control_page(struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4043 int f2fs_prepare_compress_overwrite(struct inode *inode,
4c8ff7095bef64 Chao Yu 2019-11-01 4044 struct page **pagep, pgoff_t index, void **fsdata);
4c8ff7095bef64 Chao Yu 2019-11-01 4045 bool f2fs_compress_write_end(struct inode *inode, void *fsdata,
4c8ff7095bef64 Chao Yu 2019-11-01 4046 pgoff_t index, unsigned copied);
3265d3db1f1639 Chao Yu 2020-03-18 4047 int f2fs_truncate_partial_cluster(struct inode *inode, u64 from, bool lock);
4c8ff7095bef64 Chao Yu 2019-11-01 4048 void f2fs_compress_write_end_io(struct bio *bio, struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4049 bool f2fs_is_compress_backend_ready(struct inode *inode);
5e6bbde9598230 Chao Yu 2020-04-08 4050 int f2fs_init_compress_mempool(void);
5e6bbde9598230 Chao Yu 2020-04-08 4051 void f2fs_destroy_compress_mempool(void);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4052 void f2fs_decompress_cluster(struct decompress_io_ctx *dic);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4053 void f2fs_end_read_compressed_page(struct page *page, bool failed,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4054 block_t blkaddr);
4c8ff7095bef64 Chao Yu 2019-11-01 4055 bool f2fs_cluster_is_empty(struct compress_ctx *cc);
4c8ff7095bef64 Chao Yu 2019-11-01 4056 bool f2fs_cluster_can_merge_page(struct compress_ctx *cc, pgoff_t index);
b368cc5e263411 Fengnan Chang 2021-10-22 @4057 bool f2fs_all_cluster_page_loaded(struct compress_ctx *cc, struct pagevec *pvec,
b368cc5e263411 Fengnan Chang 2021-10-22 4058 int index, int nr_pages);
bbe1da7e34ac5a Chao Yu 2021-08-06 4059 bool f2fs_sanity_check_cluster(struct dnode_of_data *dn);
4c8ff7095bef64 Chao Yu 2019-11-01 4060 void f2fs_compress_ctx_add_page(struct compress_ctx *cc, struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4061 int f2fs_write_multi_pages(struct compress_ctx *cc,
4c8ff7095bef64 Chao Yu 2019-11-01 4062 int *submitted,
4c8ff7095bef64 Chao Yu 2019-11-01 4063 struct writeback_control *wbc,
4c8ff7095bef64 Chao Yu 2019-11-01 4064 enum iostat_type io_type);
4c8ff7095bef64 Chao Yu 2019-11-01 4065 int f2fs_is_compressed_cluster(struct inode *inode, pgoff_t index);
94afd6d6e52531 Chao Yu 2021-08-04 4066 void f2fs_update_extent_tree_range_compressed(struct inode *inode,
94afd6d6e52531 Chao Yu 2021-08-04 4067 pgoff_t fofs, block_t blkaddr, unsigned int llen,
94afd6d6e52531 Chao Yu 2021-08-04 4068 unsigned int c_len);
4c8ff7095bef64 Chao Yu 2019-11-01 4069 int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,
4c8ff7095bef64 Chao Yu 2019-11-01 4070 unsigned nr_pages, sector_t *last_block_in_bio,
0683728adab251 Chao Yu 2020-02-18 4071 bool is_readahead, bool for_write);
4c8ff7095bef64 Chao Yu 2019-11-01 4072 struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc);
7f59b277f79e8a Eric Biggers 2021-01-04 4073 void f2fs_decompress_end_io(struct decompress_io_ctx *dic, bool failed);
7f59b277f79e8a Eric Biggers 2021-01-04 4074 void f2fs_put_page_dic(struct page *page);
94afd6d6e52531 Chao Yu 2021-08-04 4075 unsigned int f2fs_cluster_blocks_are_contiguous(struct dnode_of_data *dn);
4c8ff7095bef64 Chao Yu 2019-11-01 4076 int f2fs_init_compress_ctx(struct compress_ctx *cc);
8bfbfb0ddd706b Chao Yu 2021-05-10 4077 void f2fs_destroy_compress_ctx(struct compress_ctx *cc, bool reuse);
4c8ff7095bef64 Chao Yu 2019-11-01 4078 void f2fs_init_compress_info(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4079 int f2fs_init_compress_inode(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4080 void f2fs_destroy_compress_inode(struct f2fs_sb_info *sbi);
31083031709eea Chao Yu 2020-09-14 4081 int f2fs_init_page_array_cache(struct f2fs_sb_info *sbi);
31083031709eea Chao Yu 2020-09-14 4082 void f2fs_destroy_page_array_cache(struct f2fs_sb_info *sbi);
c68d6c88302250 Chao Yu 2020-09-14 4083 int __init f2fs_init_compress_cache(void);
c68d6c88302250 Chao Yu 2020-09-14 4084 void f2fs_destroy_compress_cache(void);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4085 struct address_space *COMPRESS_MAPPING(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4086 void f2fs_invalidate_compress_page(struct f2fs_sb_info *sbi, block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4087 void f2fs_cache_compressed_page(struct f2fs_sb_info *sbi, struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4088 nid_t ino, block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4089 bool f2fs_load_compressed_page(struct f2fs_sb_info *sbi, struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4090 block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4091 void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi, nid_t ino);
5ac443e26a0964 Daeho Jeong 2021-03-15 4092 #define inc_compr_inode_stat(inode) \
5ac443e26a0964 Daeho Jeong 2021-03-15 4093 do { \
5ac443e26a0964 Daeho Jeong 2021-03-15 4094 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); \
5ac443e26a0964 Daeho Jeong 2021-03-15 4095 sbi->compr_new_inode++; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4096 } while (0)
5ac443e26a0964 Daeho Jeong 2021-03-15 4097 #define add_compr_block_stat(inode, blocks) \
5ac443e26a0964 Daeho Jeong 2021-03-15 4098 do { \
5ac443e26a0964 Daeho Jeong 2021-03-15 4099 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); \
5ac443e26a0964 Daeho Jeong 2021-03-15 4100 int diff = F2FS_I(inode)->i_cluster_size - blocks; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4101 sbi->compr_written_block += blocks; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4102 sbi->compr_saved_block += diff; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4103 } while (0)
4c8ff7095bef64 Chao Yu 2019-11-01 4104 #else
4c8ff7095bef64 Chao Yu 2019-11-01 4105 static inline bool f2fs_is_compressed_page(struct page *page) { return false; }
4c8ff7095bef64 Chao Yu 2019-11-01 4106 static inline bool f2fs_is_compress_backend_ready(struct inode *inode)
4c8ff7095bef64 Chao Yu 2019-11-01 4107 {
4c8ff7095bef64 Chao Yu 2019-11-01 4108 if (!f2fs_compressed_file(inode))
4c8ff7095bef64 Chao Yu 2019-11-01 4109 return true;
4c8ff7095bef64 Chao Yu 2019-11-01 4110 /* not support compression */
4c8ff7095bef64 Chao Yu 2019-11-01 4111 return false;
4c8ff7095bef64 Chao Yu 2019-11-01 4112 }
4c8ff7095bef64 Chao Yu 2019-11-01 4113 static inline struct page *f2fs_compress_control_page(struct page *page)
4c8ff7095bef64 Chao Yu 2019-11-01 4114 {
4c8ff7095bef64 Chao Yu 2019-11-01 4115 WARN_ON_ONCE(1);
4c8ff7095bef64 Chao Yu 2019-11-01 4116 return ERR_PTR(-EINVAL);
4c8ff7095bef64 Chao Yu 2019-11-01 4117 }
5e6bbde9598230 Chao Yu 2020-04-08 4118 static inline int f2fs_init_compress_mempool(void) { return 0; }
5e6bbde9598230 Chao Yu 2020-04-08 4119 static inline void f2fs_destroy_compress_mempool(void) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4120 static inline void f2fs_decompress_cluster(struct decompress_io_ctx *dic) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4121 static inline void f2fs_end_read_compressed_page(struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4122 bool failed, block_t blkaddr)
7f59b277f79e8a Eric Biggers 2021-01-04 4123 {
7f59b277f79e8a Eric Biggers 2021-01-04 4124 WARN_ON_ONCE(1);
7f59b277f79e8a Eric Biggers 2021-01-04 4125 }
7f59b277f79e8a Eric Biggers 2021-01-04 4126 static inline void f2fs_put_page_dic(struct page *page)
7f59b277f79e8a Eric Biggers 2021-01-04 4127 {
7f59b277f79e8a Eric Biggers 2021-01-04 4128 WARN_ON_ONCE(1);
7f59b277f79e8a Eric Biggers 2021-01-04 4129 }
94afd6d6e52531 Chao Yu 2021-08-04 4130 static inline unsigned int f2fs_cluster_blocks_are_contiguous(struct dnode_of_data *dn) { return 0; }
bbe1da7e34ac5a Chao Yu 2021-08-06 4131 static inline bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) { return false; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4132 static inline int f2fs_init_compress_inode(struct f2fs_sb_info *sbi) { return 0; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4133 static inline void f2fs_destroy_compress_inode(struct f2fs_sb_info *sbi) { }
31083031709eea Chao Yu 2020-09-14 4134 static inline int f2fs_init_page_array_cache(struct f2fs_sb_info *sbi) { return 0; }
31083031709eea Chao Yu 2020-09-14 4135 static inline void f2fs_destroy_page_array_cache(struct f2fs_sb_info *sbi) { }
c68d6c88302250 Chao Yu 2020-09-14 4136 static inline int __init f2fs_init_compress_cache(void) { return 0; }
c68d6c88302250 Chao Yu 2020-09-14 4137 static inline void f2fs_destroy_compress_cache(void) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4138 static inline void f2fs_invalidate_compress_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4139 block_t blkaddr) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4140 static inline void f2fs_cache_compressed_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4141 struct page *page, nid_t ino, block_t blkaddr) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4142 static inline bool f2fs_load_compressed_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4143 struct page *page, block_t blkaddr) { return false; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4144 static inline void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4145 nid_t ino) { }
5ac443e26a0964 Daeho Jeong 2021-03-15 4146 #define inc_compr_inode_stat(inode) do { } while (0)
94afd6d6e52531 Chao Yu 2021-08-04 4147 static inline void f2fs_update_extent_tree_range_compressed(struct inode *inode,
94afd6d6e52531 Chao Yu 2021-08-04 4148 pgoff_t fofs, block_t blkaddr, unsigned int llen,
94afd6d6e52531 Chao Yu 2021-08-04 4149 unsigned int c_len) { }
4c8ff7095bef64 Chao Yu 2019-11-01 4150 #endif
4c8ff7095bef64 Chao Yu 2019-11-01 4151
:::::: The code at line 4057 was first introduced by commit
:::::: b368cc5e26341113453e7458f03cdfe0eeb84a40 f2fs: compress: fix overwrite may reduce compress ratio unproperly
:::::: TO: Fengnan Chang <changfengnan(a)vivo.com>
:::::: CC: Jaegeuk Kim <jaegeuk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[willy-pagecache:for-next 42/48] fs/f2fs/f2fs.h:4057:67: warning: declaration of 'struct pagevec' will not be visible outside of this function
by kernel test robot
tree: git://git.infradead.org/users/willy/pagecache for-next
head: 9244dddc51b5e46444a334c881372aa66138f74a
commit: 3fda3cf387c172cc9a528b6556a024627c9843de [42/48] mm: Convert find_lock_entries() to use a folio_batch
config: x86_64-randconfig-a013-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091651.l741qHlr-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
git fetch --no-tags willy-pagecache for-next
git checkout 3fda3cf387c172cc9a528b6556a024627c9843de
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/f2fs/dir.c:13:
>> fs/f2fs/f2fs.h:4057:67: warning: declaration of 'struct pagevec' will not be visible outside of this function [-Wvisibility]
bool f2fs_all_cluster_page_loaded(struct compress_ctx *cc, struct pagevec *pvec,
^
1 warning generated.
vim +4057 fs/f2fs/f2fs.h
4c8ff7095bef64 Chao Yu 2019-11-01 4036
4c8ff7095bef64 Chao Yu 2019-11-01 4037 /*
4c8ff7095bef64 Chao Yu 2019-11-01 4038 * compress.c
4c8ff7095bef64 Chao Yu 2019-11-01 4039 */
4c8ff7095bef64 Chao Yu 2019-11-01 4040 #ifdef CONFIG_F2FS_FS_COMPRESSION
4c8ff7095bef64 Chao Yu 2019-11-01 4041 bool f2fs_is_compressed_page(struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4042 struct page *f2fs_compress_control_page(struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4043 int f2fs_prepare_compress_overwrite(struct inode *inode,
4c8ff7095bef64 Chao Yu 2019-11-01 4044 struct page **pagep, pgoff_t index, void **fsdata);
4c8ff7095bef64 Chao Yu 2019-11-01 4045 bool f2fs_compress_write_end(struct inode *inode, void *fsdata,
4c8ff7095bef64 Chao Yu 2019-11-01 4046 pgoff_t index, unsigned copied);
3265d3db1f1639 Chao Yu 2020-03-18 4047 int f2fs_truncate_partial_cluster(struct inode *inode, u64 from, bool lock);
4c8ff7095bef64 Chao Yu 2019-11-01 4048 void f2fs_compress_write_end_io(struct bio *bio, struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4049 bool f2fs_is_compress_backend_ready(struct inode *inode);
5e6bbde9598230 Chao Yu 2020-04-08 4050 int f2fs_init_compress_mempool(void);
5e6bbde9598230 Chao Yu 2020-04-08 4051 void f2fs_destroy_compress_mempool(void);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4052 void f2fs_decompress_cluster(struct decompress_io_ctx *dic);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4053 void f2fs_end_read_compressed_page(struct page *page, bool failed,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4054 block_t blkaddr);
4c8ff7095bef64 Chao Yu 2019-11-01 4055 bool f2fs_cluster_is_empty(struct compress_ctx *cc);
4c8ff7095bef64 Chao Yu 2019-11-01 4056 bool f2fs_cluster_can_merge_page(struct compress_ctx *cc, pgoff_t index);
b368cc5e263411 Fengnan Chang 2021-10-22 @4057 bool f2fs_all_cluster_page_loaded(struct compress_ctx *cc, struct pagevec *pvec,
b368cc5e263411 Fengnan Chang 2021-10-22 4058 int index, int nr_pages);
bbe1da7e34ac5a Chao Yu 2021-08-06 4059 bool f2fs_sanity_check_cluster(struct dnode_of_data *dn);
4c8ff7095bef64 Chao Yu 2019-11-01 4060 void f2fs_compress_ctx_add_page(struct compress_ctx *cc, struct page *page);
4c8ff7095bef64 Chao Yu 2019-11-01 4061 int f2fs_write_multi_pages(struct compress_ctx *cc,
4c8ff7095bef64 Chao Yu 2019-11-01 4062 int *submitted,
4c8ff7095bef64 Chao Yu 2019-11-01 4063 struct writeback_control *wbc,
4c8ff7095bef64 Chao Yu 2019-11-01 4064 enum iostat_type io_type);
4c8ff7095bef64 Chao Yu 2019-11-01 4065 int f2fs_is_compressed_cluster(struct inode *inode, pgoff_t index);
94afd6d6e52531 Chao Yu 2021-08-04 4066 void f2fs_update_extent_tree_range_compressed(struct inode *inode,
94afd6d6e52531 Chao Yu 2021-08-04 4067 pgoff_t fofs, block_t blkaddr, unsigned int llen,
94afd6d6e52531 Chao Yu 2021-08-04 4068 unsigned int c_len);
4c8ff7095bef64 Chao Yu 2019-11-01 4069 int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,
4c8ff7095bef64 Chao Yu 2019-11-01 4070 unsigned nr_pages, sector_t *last_block_in_bio,
0683728adab251 Chao Yu 2020-02-18 4071 bool is_readahead, bool for_write);
4c8ff7095bef64 Chao Yu 2019-11-01 4072 struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc);
7f59b277f79e8a Eric Biggers 2021-01-04 4073 void f2fs_decompress_end_io(struct decompress_io_ctx *dic, bool failed);
7f59b277f79e8a Eric Biggers 2021-01-04 4074 void f2fs_put_page_dic(struct page *page);
94afd6d6e52531 Chao Yu 2021-08-04 4075 unsigned int f2fs_cluster_blocks_are_contiguous(struct dnode_of_data *dn);
4c8ff7095bef64 Chao Yu 2019-11-01 4076 int f2fs_init_compress_ctx(struct compress_ctx *cc);
8bfbfb0ddd706b Chao Yu 2021-05-10 4077 void f2fs_destroy_compress_ctx(struct compress_ctx *cc, bool reuse);
4c8ff7095bef64 Chao Yu 2019-11-01 4078 void f2fs_init_compress_info(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4079 int f2fs_init_compress_inode(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4080 void f2fs_destroy_compress_inode(struct f2fs_sb_info *sbi);
31083031709eea Chao Yu 2020-09-14 4081 int f2fs_init_page_array_cache(struct f2fs_sb_info *sbi);
31083031709eea Chao Yu 2020-09-14 4082 void f2fs_destroy_page_array_cache(struct f2fs_sb_info *sbi);
c68d6c88302250 Chao Yu 2020-09-14 4083 int __init f2fs_init_compress_cache(void);
c68d6c88302250 Chao Yu 2020-09-14 4084 void f2fs_destroy_compress_cache(void);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4085 struct address_space *COMPRESS_MAPPING(struct f2fs_sb_info *sbi);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4086 void f2fs_invalidate_compress_page(struct f2fs_sb_info *sbi, block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4087 void f2fs_cache_compressed_page(struct f2fs_sb_info *sbi, struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4088 nid_t ino, block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4089 bool f2fs_load_compressed_page(struct f2fs_sb_info *sbi, struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4090 block_t blkaddr);
6ce19aff0b8cd3 Chao Yu 2021-05-20 4091 void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi, nid_t ino);
5ac443e26a0964 Daeho Jeong 2021-03-15 4092 #define inc_compr_inode_stat(inode) \
5ac443e26a0964 Daeho Jeong 2021-03-15 4093 do { \
5ac443e26a0964 Daeho Jeong 2021-03-15 4094 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); \
5ac443e26a0964 Daeho Jeong 2021-03-15 4095 sbi->compr_new_inode++; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4096 } while (0)
5ac443e26a0964 Daeho Jeong 2021-03-15 4097 #define add_compr_block_stat(inode, blocks) \
5ac443e26a0964 Daeho Jeong 2021-03-15 4098 do { \
5ac443e26a0964 Daeho Jeong 2021-03-15 4099 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); \
5ac443e26a0964 Daeho Jeong 2021-03-15 4100 int diff = F2FS_I(inode)->i_cluster_size - blocks; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4101 sbi->compr_written_block += blocks; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4102 sbi->compr_saved_block += diff; \
5ac443e26a0964 Daeho Jeong 2021-03-15 4103 } while (0)
4c8ff7095bef64 Chao Yu 2019-11-01 4104 #else
4c8ff7095bef64 Chao Yu 2019-11-01 4105 static inline bool f2fs_is_compressed_page(struct page *page) { return false; }
4c8ff7095bef64 Chao Yu 2019-11-01 4106 static inline bool f2fs_is_compress_backend_ready(struct inode *inode)
4c8ff7095bef64 Chao Yu 2019-11-01 4107 {
4c8ff7095bef64 Chao Yu 2019-11-01 4108 if (!f2fs_compressed_file(inode))
4c8ff7095bef64 Chao Yu 2019-11-01 4109 return true;
4c8ff7095bef64 Chao Yu 2019-11-01 4110 /* not support compression */
4c8ff7095bef64 Chao Yu 2019-11-01 4111 return false;
4c8ff7095bef64 Chao Yu 2019-11-01 4112 }
4c8ff7095bef64 Chao Yu 2019-11-01 4113 static inline struct page *f2fs_compress_control_page(struct page *page)
4c8ff7095bef64 Chao Yu 2019-11-01 4114 {
4c8ff7095bef64 Chao Yu 2019-11-01 4115 WARN_ON_ONCE(1);
4c8ff7095bef64 Chao Yu 2019-11-01 4116 return ERR_PTR(-EINVAL);
4c8ff7095bef64 Chao Yu 2019-11-01 4117 }
5e6bbde9598230 Chao Yu 2020-04-08 4118 static inline int f2fs_init_compress_mempool(void) { return 0; }
5e6bbde9598230 Chao Yu 2020-04-08 4119 static inline void f2fs_destroy_compress_mempool(void) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4120 static inline void f2fs_decompress_cluster(struct decompress_io_ctx *dic) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4121 static inline void f2fs_end_read_compressed_page(struct page *page,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4122 bool failed, block_t blkaddr)
7f59b277f79e8a Eric Biggers 2021-01-04 4123 {
7f59b277f79e8a Eric Biggers 2021-01-04 4124 WARN_ON_ONCE(1);
7f59b277f79e8a Eric Biggers 2021-01-04 4125 }
7f59b277f79e8a Eric Biggers 2021-01-04 4126 static inline void f2fs_put_page_dic(struct page *page)
7f59b277f79e8a Eric Biggers 2021-01-04 4127 {
7f59b277f79e8a Eric Biggers 2021-01-04 4128 WARN_ON_ONCE(1);
7f59b277f79e8a Eric Biggers 2021-01-04 4129 }
94afd6d6e52531 Chao Yu 2021-08-04 4130 static inline unsigned int f2fs_cluster_blocks_are_contiguous(struct dnode_of_data *dn) { return 0; }
bbe1da7e34ac5a Chao Yu 2021-08-06 4131 static inline bool f2fs_sanity_check_cluster(struct dnode_of_data *dn) { return false; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4132 static inline int f2fs_init_compress_inode(struct f2fs_sb_info *sbi) { return 0; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4133 static inline void f2fs_destroy_compress_inode(struct f2fs_sb_info *sbi) { }
31083031709eea Chao Yu 2020-09-14 4134 static inline int f2fs_init_page_array_cache(struct f2fs_sb_info *sbi) { return 0; }
31083031709eea Chao Yu 2020-09-14 4135 static inline void f2fs_destroy_page_array_cache(struct f2fs_sb_info *sbi) { }
c68d6c88302250 Chao Yu 2020-09-14 4136 static inline int __init f2fs_init_compress_cache(void) { return 0; }
c68d6c88302250 Chao Yu 2020-09-14 4137 static inline void f2fs_destroy_compress_cache(void) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4138 static inline void f2fs_invalidate_compress_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4139 block_t blkaddr) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4140 static inline void f2fs_cache_compressed_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4141 struct page *page, nid_t ino, block_t blkaddr) { }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4142 static inline bool f2fs_load_compressed_page(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4143 struct page *page, block_t blkaddr) { return false; }
6ce19aff0b8cd3 Chao Yu 2021-05-20 4144 static inline void f2fs_invalidate_compress_pages(struct f2fs_sb_info *sbi,
6ce19aff0b8cd3 Chao Yu 2021-05-20 4145 nid_t ino) { }
5ac443e26a0964 Daeho Jeong 2021-03-15 4146 #define inc_compr_inode_stat(inode) do { } while (0)
94afd6d6e52531 Chao Yu 2021-08-04 4147 static inline void f2fs_update_extent_tree_range_compressed(struct inode *inode,
94afd6d6e52531 Chao Yu 2021-08-04 4148 pgoff_t fofs, block_t blkaddr, unsigned int llen,
94afd6d6e52531 Chao Yu 2021-08-04 4149 unsigned int c_len) { }
4c8ff7095bef64 Chao Yu 2019-11-01 4150 #endif
4c8ff7095bef64 Chao Yu 2019-11-01 4151
:::::: The code at line 4057 was first introduced by commit
:::::: b368cc5e26341113453e7458f03cdfe0eeb84a40 f2fs: compress: fix overwrite may reduce compress ratio unproperly
:::::: TO: Fengnan Chang <changfengnan(a)vivo.com>
:::::: CC: Jaegeuk Kim <jaegeuk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[tobetter:odroid-5.16.y 47/75] drivers/power/reset/odroid-reboot.c:141:17: error: 'arm_pm_restart' undeclared; did you mean 'alarm_restart'?
by kernel test robot
tree: https://github.com/tobetter/linux odroid-5.16.y
head: 04f296b5f991198f16f76ba15a23e9e00e30aac4
commit: 2c677a9186d050d7da424a02db0ab29d4796bb7d [47/75] ODROID-COMMON: power:reset: Add odroid support
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20211209/202112091542.MRWwHDRg-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/tobetter/linux/commit/2c677a9186d050d7da424a02db0ab29d...
git remote add tobetter https://github.com/tobetter/linux
git fetch --no-tags tobetter odroid-5.16.y
git checkout 2c677a9186d050d7da424a02db0ab29d4796bb7d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/power/reset/odroid-reboot.c:63:6: warning: no previous prototype for 'odroid_card_reset' [-Wmissing-prototypes]
63 | void odroid_card_reset(void)
| ^~~~~~~~~~~~~~~~~
drivers/power/reset/odroid-reboot.c: In function 'odroid_restart_probe':
>> drivers/power/reset/odroid-reboot.c:141:17: error: 'arm_pm_restart' undeclared (first use in this function); did you mean 'alarm_restart'?
141 | arm_pm_restart = do_odroid_restart;
| ^~~~~~~~~~~~~~
| alarm_restart
drivers/power/reset/odroid-reboot.c:141:17: note: each undeclared identifier is reported only once for each function it appears in
vim +141 drivers/power/reset/odroid-reboot.c
62
> 63 void odroid_card_reset(void)
64 {
65 int ret = 0;
66
67 if ((sd_vqsw == 0) && (sd_vmmc == 0))
68 return;
69
70 if (sd_vqen == 0) {
71 gpio_free(sd_vqsw);
72 gpio_free(sd_vmmc);
73 ret = gpio_request_one(sd_vqsw,
74 GPIOF_OUT_INIT_LOW, "REBOOT");
75 CHECK_RET(ret);
76 mdelay(10);
77 ret = gpio_direction_output(sd_vqsw, 1);
78 CHECK_RET(ret);
79 ret = gpio_request_one(sd_vmmc,
80 GPIOF_OUT_INIT_LOW, "REBOOT");
81 CHECK_RET(ret);
82 mdelay(10);
83 ret = gpio_direction_output(sd_vqsw, 0);
84 CHECK_RET(ret);
85 ret = gpio_direction_output(sd_vmmc, 1);
86 CHECK_RET(ret);
87 mdelay(5);
88 gpio_free(sd_vqsw);
89 gpio_free(sd_vmmc);
90 } else {
91 gpio_free(sd_vqsw);
92 gpio_free(sd_vqen);
93 gpio_free(sd_vmmc);
94
95 ret = gpio_request_one(sd_vqsw,
96 GPIOF_OUT_INIT_LOW, "REBOOT");
97 CHECK_RET(ret);
98 ret = gpio_request_one(sd_vqen,
99 GPIOF_OUT_INIT_LOW, "REBOOT");
100 CHECK_RET(ret);
101 ret = gpio_request_one(sd_vmmc,
102 GPIOF_OUT_INIT_LOW, "REBOOT");
103 CHECK_RET(ret);
104 mdelay(100);
105 ret = gpio_direction_input(sd_vqen);
106 CHECK_RET(ret);
107 ret = gpio_direction_input(sd_vmmc);
108 CHECK_RET(ret);
109 ret = gpio_direction_input(sd_vqsw);
110 CHECK_RET(ret);
111 mdelay(5);
112 gpio_free(sd_vqen);
113 gpio_free(sd_vmmc);
114 gpio_free(sd_vqsw);
115 }
116 }
117
118 static void do_odroid_restart(enum reboot_mode reboot_mode, const char *cmd)
119 {
120 odroid_card_reset();
121 __invoke_psci_fn_smc(psci_function_id_restart,
122 0, 0, 0);
123 }
124
125 static void do_odroid_poweroff(void)
126 {
127 odroid_card_reset();
128
129 __invoke_psci_fn_smc(0x82000042, 1, 0, 0);
130 __invoke_psci_fn_smc(psci_function_id_poweroff,
131 0, 0, 0);
132 }
133
134 static int odroid_restart_probe(struct platform_device *pdev)
135 {
136 struct device_node *of_node;
137 u32 id;
138
139 if (!of_property_read_u32(pdev->dev.of_node, "sys_reset", &id)) {
140 psci_function_id_restart = id;
> 141 arm_pm_restart = do_odroid_restart;
142 }
143
144 if (!of_property_read_u32(pdev->dev.of_node, "sys_poweroff", &id)) {
145 psci_function_id_poweroff = id;
146 pm_power_off = do_odroid_poweroff;
147 }
148
149 of_node = pdev->dev.of_node;
150
151 sd_vqsw = of_get_named_gpio(of_node, "sd-vqsw", 0);
152 if (!gpio_is_valid(sd_vqsw)) sd_vqsw = 0;
153
154 sd_vmmc = of_get_named_gpio(of_node, "sd-vmmc", 0);
155 if (!gpio_is_valid(sd_vmmc)) sd_vmmc = 0;
156
157 sd_vqen = of_get_named_gpio(of_node, "sd-vqen", 0);
158 if (!gpio_is_valid(sd_vqen)) sd_vqen = 0;
159
160 return 0;
161 }
162
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
Re: [PATCH] btrfs: harden identification of the stale device
by kernel test robot
Hi Anand,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.16-rc4 next-20211208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Anand-Jain/btrfs-harden-identifi...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: i386-randconfig-s001-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091123.ETjD5KQj-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/03b597640967afb3d37dc37f0a685fed9...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Anand-Jain/btrfs-harden-identification-of-the-stale-device/20211208-220757
git checkout 03b597640967afb3d37dc37f0a685fed95594b83
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
fs/btrfs/volumes.c:402:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rcu_string *str @@ got struct rcu_string [noderef] __rcu *name @@
fs/btrfs/volumes.c:402:31: sparse: expected struct rcu_string *str
fs/btrfs/volumes.c:402:31: sparse: got struct rcu_string [noderef] __rcu *name
>> fs/btrfs/volumes.c:549:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *pathname @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:549:35: sparse: expected char const *pathname
fs/btrfs/volumes.c:549:35: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:643:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:643:43: sparse: expected char const *device_path
fs/btrfs/volumes.c:643:43: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:904:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *cs @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:904:50: sparse: expected char const *cs
fs/btrfs/volumes.c:904:50: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:984:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct rcu_string *str @@ got struct rcu_string [noderef] __rcu *name @@
fs/btrfs/volumes.c:984:39: sparse: expected struct rcu_string *str
fs/btrfs/volumes.c:984:39: sparse: got struct rcu_string [noderef] __rcu *name
fs/btrfs/volumes.c:1040:58: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *src @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:1040:58: sparse: expected char const *src
fs/btrfs/volumes.c:1040:58: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:2235:49: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:2235:49: sparse: expected char const *device_path
fs/btrfs/volumes.c:2235:49: sparse: got char [noderef] __rcu *
fs/btrfs/volumes.c:2350:41: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected char const *device_path @@ got char [noderef] __rcu * @@
fs/btrfs/volumes.c:2350:41: sparse: expected char const *device_path
fs/btrfs/volumes.c:2350:41: sparse: got char [noderef] __rcu *
vim +549 fs/btrfs/volumes.c
532
533 /*
534 * Check if the device in the 'path' matches with the device in the given
535 * struct btrfs_device '*device'.
536 * Returns:
537 * 0 If it is the same device.
538 * 1 If it is not the same device.
539 * -errno For error.
540 */
541 static int device_matched(struct btrfs_device *device, const char *path)
542 {
543 dev_t dev_old;
544 dev_t dev_new;
545 int error;
546
547 lockdep_assert_held(&device->fs_devices->device_list_mutex);
548 /* rcu is not required as we are inside the device_list_mutex */
> 549 error = lookup_bdev(device->name->str, &dev_old);
550 if (error)
551 return error;
552
553 error = lookup_bdev(path, &dev_new);
554 if (error)
555 return error;
556
557 if (dev_old == dev_new)
558 return 0;
559
560 return 1;
561 }
562
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
drivers/pinctrl/bcm/pinctrl-bcm2835.c:413:14: warning: variable 'group' is used uninitialized whenever 'for' loop exits because its condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2a987e65025e2b79c6d453b78cb5985ac6e5eb26
commit: 4434f4c50345c84373b7117b5c827a88870f9d36 pinctrl: bcm2835: Allow building driver as a module
date: 6 weeks ago
config: mips-randconfig-r001-20211209 (https://download.01.org/0day-ci/archive/20211209/202112091309.HCSKbMQS-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4434f4c50345c84373b7117b5c827a88870f9d36
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/pinctrl/bcm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pinctrl/bcm/pinctrl-bcm2835.c:413:14: warning: variable 'group' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
for (i = 0; i < BCM2835_NUM_IRQS; i++) {
^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:424:10: note: uninitialized use occurs here
switch (group) {
^~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:413:14: note: remove the condition if it is always true
for (i = 0; i < BCM2835_NUM_IRQS; i++) {
^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:410:11: note: initialize the variable 'group' to silence this warning
int group;
^
= 0
1 warning generated.
vim +413 drivers/pinctrl/bcm/pinctrl-bcm2835.c
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 403
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 404 static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 405 {
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 406 struct gpio_chip *chip = irq_desc_get_handler_data(desc);
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 407 struct bcm2835_pinctrl *pc = gpiochip_get_data(chip);
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 408 struct irq_chip *host_chip = irq_desc_get_chip(desc);
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 409 int irq = irq_desc_get_irq(desc);
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 410 int group;
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 411 int i;
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 412
73345a18d464b1 drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2019-08-12 @413 for (i = 0; i < BCM2835_NUM_IRQS; i++) {
73345a18d464b1 drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2019-08-12 414 if (chip->irq.parents[i] == irq) {
0d885e9da176ad drivers/pinctrl/bcm/pinctrl-bcm2835.c Thierry Reding 2017-07-20 415 group = i;
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 416 break;
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 417 }
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 418 }
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 419 /* This should not happen, every IRQ has a bank */
29d45a642d4ea8 drivers/pinctrl/bcm/pinctrl-bcm2835.c Jason Wang 2021-06-24 420 BUG_ON(i == BCM2835_NUM_IRQS);
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 421
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 422 chained_irq_enter(host_chip, desc);
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 423
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 424 switch (group) {
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 425 case 0: /* IRQ0 covers GPIOs 0-27 */
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 426 bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff);
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 427 break;
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 428 case 1: /* IRQ1 covers GPIOs 28-45 */
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 429 bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000);
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 430 bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff);
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 431 break;
b1d84a3d0a26c5 drivers/pinctrl/bcm/pinctrl-bcm2835.c Stefan Wahren 2020-02-08 432 case 2: /* IRQ2 covers GPIOs 46-57 */
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 433 bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000);
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 434 break;
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 435 }
00445b5d5866c7 drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 436
85ae9e512f437c drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 437 chained_irq_exit(host_chip, desc);
e1b2dc70cd5b00 drivers/pinctrl/pinctrl-bcm2835.c Simon Arlott 2012-09-27 438 }
e1b2dc70cd5b00 drivers/pinctrl/pinctrl-bcm2835.c Simon Arlott 2012-09-27 439
:::::: The code at line 413 was first introduced by commit
:::::: 73345a18d464b1b945b29f54f630ace6873344e2 pinctrl: bcm2835: Pass irqchip when adding gpiochip
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
[freescale-fslc:5.10-2.1.x-imx 9000/16146] sound/soc/sof/compress.c:91:5: warning: no previous prototype for function 'sof_compr_open'
by kernel test robot
tree: https://github.com/Freescale/linux-fslc 5.10-2.1.x-imx
head: 97b03e732ae16a3b30736ac12cf838a5c2db3eca
commit: 6ba9191d51ddea63f1924c87411ae6745bc0cbbf [9000/16146] LF-3665-5 ASoC: SOF: compr: Add compress ops implementation
config: riscv-randconfig-r042-20211207 (https://download.01.org/0day-ci/archive/20211209/202112091312.E8YDGdAj-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 097a1cb1d5ebb3a0ec4bcaed8ba3ff6a8e33c00a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/Freescale/linux-fslc/commit/6ba9191d51ddea63f1924c8741...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.10-2.1.x-imx
git checkout 6ba9191d51ddea63f1924c87411ae6745bc0cbbf
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/firmware/imx/ drivers/regulator/ sound/soc/sof/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from sound/soc/sof/compress.c:7:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:57:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from sound/soc/sof/compress.c:7:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from sound/soc/sof/compress.c:7:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from sound/soc/sof/compress.c:7:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:61:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from sound/soc/sof/compress.c:7:
In file included from include/sound/soc.h:18:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:1005:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> sound/soc/sof/compress.c:91:5: warning: no previous prototype for function 'sof_compr_open' [-Wmissing-prototypes]
int sof_compr_open(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:91:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_open(struct snd_soc_component *component,
^
static
>> sound/soc/sof/compress.c:122:5: warning: no previous prototype for function 'sof_compr_free' [-Wmissing-prototypes]
int sof_compr_free(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_free(struct snd_soc_component *component,
^
static
>> sound/soc/sof/compress.c:140:5: warning: no previous prototype for function 'sof_compr_set_params' [-Wmissing-prototypes]
int sof_compr_set_params(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:140:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_set_params(struct snd_soc_component *component,
^
static
>> sound/soc/sof/compress.c:194:5: warning: no previous prototype for function 'sof_compr_get_params' [-Wmissing-prototypes]
int sof_compr_get_params(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:194:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_get_params(struct snd_soc_component *component,
^
static
>> sound/soc/sof/compress.c:200:5: warning: no previous prototype for function 'sof_compr_trigger' [-Wmissing-prototypes]
int sof_compr_trigger(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_trigger(struct snd_soc_component *component,
^
static
>> sound/soc/sof/compress.c:234:5: warning: no previous prototype for function 'sof_compr_copy' [-Wmissing-prototypes]
int sof_compr_copy(struct snd_soc_component *component,
^
sound/soc/sof/compress.c:234:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sof_compr_copy(struct snd_soc_component *component,
^
static
13 warnings generated.
vim +/sof_compr_open +91 sound/soc/sof/compress.c
90
> 91 int sof_compr_open(struct snd_soc_component *component,
92 struct snd_compr_stream *cstream)
93 {
94 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
95 struct snd_compr_runtime *runtime = cstream->runtime;
96 struct sof_compr_stream *sstream;
97 struct snd_sof_pcm *spcm;
98 int dir;
99
100 sstream = kzalloc(sizeof(*sstream), GFP_KERNEL);
101 if (!sstream)
102 return -ENOMEM;
103
104 spcm = snd_sof_find_spcm_dai(component, rtd);
105 if (!spcm) {
106 kfree(sstream);
107 return -EINVAL;
108 }
109
110 dir = cstream->direction;
111
112 spcm->stream[dir].posn.host_posn = 0;
113 spcm->stream[dir].posn.dai_posn = 0;
114 spcm->stream[dir].cstream = cstream;
115 spcm->prepared[dir] = false;
116
117 runtime->private_data = sstream;
118
119 return 0;
120 }
121
> 122 int sof_compr_free(struct snd_soc_component *component,
123 struct snd_compr_stream *cstream)
124 {
125 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
126 struct snd_compr_runtime *runtime = cstream->runtime;
127 struct sof_compr_stream *sstream = runtime->private_data;
128 struct snd_sof_pcm *spcm;
129
130 spcm = snd_sof_find_spcm_dai(component, rtd);
131 if (!spcm)
132 return -EINVAL;
133
134 cancel_work_sync(&spcm->stream[cstream->direction].period_elapsed_work);
135 kfree(sstream);
136
137 return 0;
138 }
139
> 140 int sof_compr_set_params(struct snd_soc_component *component,
141 struct snd_compr_stream *cstream, struct snd_compr_params *params)
142 {
143 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component);
144 struct snd_soc_pcm_runtime *rtd_pcm = cstream->private_data;
145 struct snd_compr_runtime *rtd = cstream->runtime;
146 struct sof_compr_stream *sstream = rtd->private_data;
147 struct sof_ipc_pcm_params_reply ipc_params_reply;
148 struct sof_ipc_pcm_params pcm;
149 struct snd_sof_pcm *spcm;
150 int ret;
151
152 spcm = snd_sof_find_spcm_dai(component, rtd_pcm);
153 if (!spcm)
154 return -EINVAL;
155
156 cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG;
157 cstream->dma_buffer.dev.dev = sdev->dev;
158 ret = snd_compr_malloc_pages(cstream, rtd->buffer_size);
159 if (ret < 0)
160 return ret;
161
162 create_page_table(component, cstream, rtd->dma_area, rtd->dma_bytes);
163
164 pcm.params.buffer.pages = PFN_UP(rtd->dma_bytes);
165 pcm.hdr.size = sizeof(pcm);
166 pcm.hdr.cmd = SOF_IPC_GLB_STREAM_MSG | SOF_IPC_STREAM_PCM_PARAMS;
167
168 pcm.comp_id = spcm->stream[cstream->direction].comp_id;
169 pcm.params.hdr.size = sizeof(pcm.params);
170 pcm.params.buffer.phy_addr = spcm->stream[cstream->direction].page_table.addr;
171 pcm.params.buffer.size = rtd->dma_bytes;
172 pcm.params.direction = cstream->direction;
173 pcm.params.channels = params->codec.ch_out;
174 pcm.params.rate = params->codec.sample_rate;
175 pcm.params.buffer_fmt = SOF_IPC_BUFFER_INTERLEAVED;
176 pcm.params.frame_fmt = SOF_IPC_FRAME_S32_LE;
177 pcm.params.sample_container_bytes =
178 snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32) >> 3;
179 pcm.params.host_period_bytes = params->buffer.fragment_size;
180
181 ret = sof_ipc_tx_message(sdev->ipc, pcm.hdr.cmd, &pcm, sizeof(pcm),
182 &ipc_params_reply, sizeof(ipc_params_reply));
183 if (ret < 0) {
184 dev_err(component->dev, "error ipc failed\n");
185 return ret;
186 }
187
188 sstream->sample_rate = params->codec.sample_rate;
189 spcm->prepared[cstream->direction] = true;
190
191 return 0;
192 }
193
> 194 int sof_compr_get_params(struct snd_soc_component *component,
195 struct snd_compr_stream *cstream, struct snd_codec *params)
196 {
197 return 0;
198 }
199
> 200 int sof_compr_trigger(struct snd_soc_component *component,
201 struct snd_compr_stream *cstream, int cmd)
202 {
203 struct sof_ipc_stream stream;
204 struct sof_ipc_reply reply;
205 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
206 struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(component);
207 struct snd_sof_pcm *spcm;
208
209 spcm = snd_sof_find_spcm_dai(component, rtd);
210 if (!spcm)
211 return -EINVAL;
212
213 stream.hdr.size = sizeof(stream);
214 stream.hdr.cmd = SOF_IPC_GLB_STREAM_MSG;
215 stream.comp_id = spcm->stream[cstream->direction].comp_id;
216
217 switch (cmd) {
218 case SNDRV_PCM_TRIGGER_START:
219 stream.hdr.cmd |= SOF_IPC_STREAM_TRIG_START;
220 break;
221 case SNDRV_PCM_TRIGGER_STOP:
222 stream.hdr.cmd |= SOF_IPC_STREAM_TRIG_STOP;
223 break;
224 default:
225 dev_err(component->dev, "error: unhandled trigger cmd %d\n", cmd);
226 break;
227 }
228
229 return sof_ipc_tx_message(sdev->ipc, stream.hdr.cmd,
230 &stream, sizeof(stream),
231 &reply, sizeof(reply));
232 }
233
> 234 int sof_compr_copy(struct snd_soc_component *component,
235 struct snd_compr_stream *cstream,
236 char __user *buf, size_t count)
237 {
238 struct snd_compr_runtime *rtd = cstream->runtime;
239 unsigned int offset, n;
240 void *ptr;
241 int ret;
242
243 if (count > rtd->buffer_size)
244 count = rtd->buffer_size;
245
246 div_u64_rem(rtd->total_bytes_available, rtd->buffer_size, &offset);
247 ptr = rtd->dma_area + offset;
248 n = rtd->buffer_size - offset;
249
250 if (count < n) {
251 ret = copy_from_user(ptr, buf, count);
252 } else {
253 ret = copy_from_user(ptr, buf, n);
254 ret += copy_from_user(rtd->dma_area, buf + n, count - n);
255 }
256
257 return count - ret;
258 }
259
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks
Re: [PATCH 02/73] libata: Add ata_port_classify() helper
by kernel test robot
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on rostedt-trace/for-next]
[also build test WARNING on axboe-block/for-next linus/master v5.16-rc4 next-20211208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/libata-rework-lo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20211209/202112091250.Wg19kdGn-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/6b66f083c8ccc2d25de4c0a9bc9229f38...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hannes-Reinecke/libata-rework-logging-take-II/20211209-003634
git checkout 6b66f083c8ccc2d25de4c0a9bc9229f38952bf10
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/ata/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/ata/libata-core.c:972:13: warning: no previous prototype for 'ata_dev_class_string' [-Wmissing-prototypes]
972 | const char *ata_dev_class_string(unsigned int class)
| ^~~~~~~~~~~~~~~~~~~~
vim +/ata_dev_class_string +972 drivers/ata/libata-core.c
971
> 972 const char *ata_dev_class_string(unsigned int class)
973 {
974 static const char * const class_str[] = {
975 "unknown",
976 "ATA",
977 "ATA (unsupported)",
978 "ATAPI",
979 "ATAPI (unsupported",
980 "PMP",
981 "PMP (unsupported)",
982 "SEMB",
983 "SEMB (unsupported)",
984 "ZAC",
985 "ZAC (unsupported)",
986 "none",
987 };
988 if (class == 0 || (class - 1) >= ARRAY_SIZE(class_str))
989 return "unknown";
990 return class_str[class - 1];
991 }
992
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 2 weeks