diff mbox series

xfs: Fix build error for implicit function declaration

Message ID 20220602063958.527493-1-sunliming@kylinos.cn (mailing list archive)
State New, archived
Headers show
Series xfs: Fix build error for implicit function declaration | expand

Commit Message

sunliming June 2, 2022, 6:39 a.m. UTC
fs/xfs/libxfs/xfs_btree.c: In function '__xfs_btree_check_lblock':
>> fs/xfs/libxfs/xfs_btree.c:140:23: error: implicit declaration of function 'xfs_daddr_to_xfo'; did you mean 'xfs_daddr_to_agno'? [-Werror=implicit-function-declaration]
     140 |                 fsb = xfs_daddr_to_xfo(xfs_buf_daddr(bp));
         |                       ^~~~~~~~~~~~~~~~
         |                       xfs_daddr_to_agno
   cc1: some warnings being treated as errors

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
---
 fs/xfs/scrub/xfile.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/fs/xfs/scrub/xfile.h b/fs/xfs/scrub/xfile.h
index 973b0641b88a..a7ae99d32b5d 100644
--- a/fs/xfs/scrub/xfile.h
+++ b/fs/xfs/scrub/xfile.h
@@ -122,6 +122,13 @@  static inline loff_t xfile_size(struct xfile *xf)
 {
 	return 0;
 }
+
+static inline loff_t xfo_to_b(xfileoff_t xfoff) {}
+static inline xfileoff_t b_to_xfo(loff_t pos) {}
+static inline xfileoff_t b_to_xfot(loff_t pos) {}
+static inline xfs_daddr_t xfo_to_daddr(xfileoff_t xfoff) {}
+static inline xfileoff_t xfs_daddr_to_xfo(xfs_daddr_t bb) {}
+static inline xfileoff_t xfs_daddr_to_xfot(xfs_daddr_t bb) {}
 #endif /* CONFIG_XFS_IN_MEMORY_FILE */
 
 #endif /* __XFS_SCRUB_XFILE_H__ */