[chao:feature/cache 6/13] fs/f2fs/recovery.c:439:21: warning: variable 'rn' set but not used
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git feature/cache head: cc6a23d8c232f588f3a5415d1b10a19e1e4ce860 commit: 843ddf01eb4efc800bdac9de795bdeb57940a3e0 [6/13] f2fs: cache: use meta cache config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260819/[email protected]/config) compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): | ^ fs/f2fs/recovery.c:360:29: error: call to undeclared function 'CACHE_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 360 | __func__, ino_of_node(CACHE_FOLIO(entry)), name_len, name, | ^ fs/f2fs/recovery.c:360:29: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 360 | __func__, ino_of_node(CACHE_FOLIO(entry)), name_len, name, | ^~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:2132:45: note: expanded from macro 'f2fs_notice' 2132 | f2fs_printk(sbi, false, KERN_NOTICE fmt, ##__VA_ARGS__) | ^~~~~~~~~~~ fs/f2fs/node.h:243:53: note: passing argument to parameter 'node_folio' here 243 | static inline nid_t ino_of_node(const struct folio *node_folio) | ^ fs/f2fs/recovery.c:400:34: error: call to undeclared function 'CACHE_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 400 | if (!is_recoverable_dnode(sbi, CACHE_FOLIO(entry))) { | ^ fs/f2fs/recovery.c:400:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 400 | if (!is_recoverable_dnode(sbi, CACHE_FOLIO(entry))) { | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:314:87: note: passing argument to parameter 'folio' here 314 | static inline bool is_recoverable_dnode(struct f2fs_sb_info *sbi, const struct folio *folio) | ^ fs/f2fs/recovery.c:407:27: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 407 | next_blkaddr_of_node(CACHE_FOLIO(entry))); | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:268:64: note: passing argument to parameter 'node_folio' here 268 | static inline block_t next_blkaddr_of_node(const struct folio *node_folio) | ^ fs/f2fs/recovery.c:409:40: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 409 | *blkaddr_fast = next_blkaddr_of_node(CACHE_FOLIO(entry)); | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:268:64: note: passing argument to parameter 'node_folio' here 268 | static inline block_t next_blkaddr_of_node(const struct folio *node_folio) | ^ fs/f2fs/recovery.c:451:34: error: call to undeclared function 'CACHE_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 451 | if (!is_recoverable_dnode(sbi, CACHE_FOLIO(entry))) { | ^ fs/f2fs/recovery.c:451:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 451 | if (!is_recoverable_dnode(sbi, CACHE_FOLIO(entry))) { | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:314:87: note: passing argument to parameter 'folio' here 314 | static inline bool is_recoverable_dnode(struct f2fs_sb_info *sbi, const struct folio *folio) | ^ fs/f2fs/recovery.c:456:23: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 456 | if (!is_fsync_dnode(CACHE_FOLIO(entry))) | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:404:39: note: expanded from macro 'is_fsync_dnode' 404 | #define is_fsync_dnode(folio) is_node(folio, FSYNC_BIT_SHIFT) | ^~~~~ fs/f2fs/node.h:397:47: note: passing argument to parameter 'folio' here 397 | static inline int is_node(const struct folio *folio, int type) | ^ fs/f2fs/recovery.c:459:51: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 459 | fsync_entry = get_fsync_inode(head, ino_of_node(CACHE_FOLIO(entry))); | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:243:53: note: passing argument to parameter 'node_folio' here 243 | static inline nid_t ino_of_node(const struct folio *node_folio) | ^ fs/f2fs/recovery.c:464:15: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 464 | IS_INODE(CACHE_FOLIO(entry)) && | ^~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:3272:49: note: passing argument to parameter 'folio' here 3272 | static inline bool IS_INODE(const struct folio *folio) | ^ fs/f2fs/recovery.c:465:20: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 465 | is_dent_dnode(CACHE_FOLIO(entry))) { | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:405:38: note: expanded from macro 'is_dent_dnode' 405 | #define is_dent_dnode(folio) is_node(folio, DENT_BIT_SHIFT) | ^~~~~ fs/f2fs/node.h:397:47: note: passing argument to parameter 'folio' here 397 | static inline int is_node(const struct folio *folio, int type) | ^ fs/f2fs/recovery.c:474:57: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 474 | fsync_entry = add_fsync_inode(sbi, head, ino_of_node(CACHE_FOLIO(entry)), | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:243:53: note: passing argument to parameter 'node_folio' here 243 | static inline nid_t ino_of_node(const struct folio *node_folio) | ^ fs/f2fs/recovery.c:493:16: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 493 | if (IS_INODE(CACHE_FOLIO(entry)) && is_dent_dnode(CACHE_FOLIO(entry))) | ^~~~~~~~~~~~~~~~~~ fs/f2fs/f2fs.h:3272:49: note: passing argument to parameter 'folio' here 3272 | static inline bool IS_INODE(const struct folio *folio) | ^ fs/f2fs/recovery.c:493:53: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 493 | if (IS_INODE(CACHE_FOLIO(entry)) && is_dent_dnode(CACHE_FOLIO(entry))) | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:405:38: note: expanded from macro 'is_dent_dnode' 405 | #define is_dent_dnode(folio) is_node(folio, DENT_BIT_SHIFT) | ^~~~~ fs/f2fs/node.h:397:47: note: passing argument to parameter 'folio' here 397 | static inline int is_node(const struct folio *folio, int type) | ^ fs/f2fs/recovery.c:497:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const struct folio *' [-Wint-conversion] 497 | blkaddr = next_blkaddr_of_node(CACHE_FOLIO(entry)); | ^~~~~~~~~~~~~~~~~~ fs/f2fs/node.h:268:64: note: passing argument to parameter 'node_folio' here 268 | static inline block_t next_blkaddr_of_node(const struct folio *node_folio) | ^ >> fs/f2fs/recovery.c:439:21: warning: variable 'rn' set but not used [-Wunused-but-set-variable] 439 | struct f2fs_node *rn; | ^ fs/f2fs/recovery.c:659:15: error: call to undeclared function 'CACHE_FOLIO'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 659 | if (IS_INODE(CACHE_FOLIO(entry))) { | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 1 warning and 20 errors generated. vim +/rn +439 fs/f2fs/recovery.c 422 423 static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head, 424 bool check_only, bool *new_inode) 425 { 426 struct curseg_info *curseg; 427 block_t blkaddr, blkaddr_fast; 428 bool is_detecting = true; 429 int err = 0; 430 431 /* get node pages in the current segment */ 432 curseg = CURSEG_I(sbi, CURSEG_WARM_NODE); 433 blkaddr = NEXT_FREE_BLKADDR(sbi, curseg); 434 blkaddr_fast = blkaddr; 435 436 while (1) { 437 struct fsync_inode_entry *fsync_entry; 438 struct f2fs_cached_block *entry; > 439 struct f2fs_node *rn; 440 441 if (!f2fs_is_valid_blkaddr(sbi, blkaddr, META_POR)) 442 return 0; 443 444 entry = f2fs_get_tmp_cache(sbi, blkaddr); 445 if (IS_ERR(entry)) { 446 err = PTR_ERR(entry); 447 break; 448 } 449 rn = CACHED_NODE(entry); 450 451 if (!is_recoverable_dnode(sbi, CACHE_FOLIO(entry))) { 452 f2fs_put_cache(entry, true); 453 break; 454 } 455 456 if (!is_fsync_dnode(CACHE_FOLIO(entry))) 457 goto next; 458 459 fsync_entry = get_fsync_inode(head, ino_of_node(CACHE_FOLIO(entry))); 460 if (!fsync_entry) { 461 bool quota_inode = false; 462 463 if (!check_only && 464 IS_INODE(CACHE_FOLIO(entry)) && 465 is_dent_dnode(CACHE_FOLIO(entry))) { 466 err = f2fs_recover_inode_page(sbi, entry); 467 if (err) { 468 f2fs_put_cache(entry, true); 469 break; 470 } 471 quota_inode = true; 472 } 473 474 fsync_entry = add_fsync_inode(sbi, head, ino_of_node(CACHE_FOLIO(entry)), 475 quota_inode); 476 if (IS_ERR(fsync_entry)) { 477 err = PTR_ERR(fsync_entry); 478 /* 479 * CP | dnode(F) | inode(DF) 480 * For this case, we should not give up now. 481 */ 482 if (err == -ENOENT) { 483 if (check_only) 484 *new_inode = true; 485 goto next; 486 } 487 f2fs_put_cache(entry, true); 488 break; 489 } 490 } 491 fsync_entry->blkaddr = blkaddr; 492 493 if (IS_INODE(CACHE_FOLIO(entry)) && is_dent_dnode(CACHE_FOLIO(entry))) 494 fsync_entry->last_dentry = blkaddr; 495 next: 496 /* check next segment */ 497 blkaddr = next_blkaddr_of_node(CACHE_FOLIO(entry)); 498 f2fs_put_cache(entry, true); 499 500 err = sanity_check_node_chain(sbi, blkaddr, &blkaddr_fast, 501 &is_detecting); 502 if (err) 503 break; 504 } 505 return err; 506 } 507 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki