lkml.org 
[lkml]   [2021]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[djwong-xfs:repair-symlink-swapext 325/325] fs/xfs/libxfs/xfs_symlink_remote.c:387:1: warning: no previous prototype for function 'xfs_symlink_remote_truncate'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: 851df07d9599471df909c4ff0e3cf33f4b9619f0 [325/325] xfs: convert symlink repair to use swapext
config: riscv-randconfig-r042-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162223.7F9L1svL-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?id=851df07d9599471df909c4ff0e3cf33f4b9619f0
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout 851df07d9599471df909c4ff0e3cf33f4b9619f0
# 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 fs/xfs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

fs/xfs/libxfs/xfs_symlink_remote.c:28:1: warning: no previous prototype for function 'xfs_symlink_blocks' [-Wmissing-prototypes]
xfs_symlink_blocks(
^
fs/xfs/libxfs/xfs_symlink_remote.c:27:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:38:1: warning: no previous prototype for function 'xfs_symlink_hdr_set' [-Wmissing-prototypes]
xfs_symlink_hdr_set(
^
fs/xfs/libxfs/xfs_symlink_remote.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:68:1: warning: no previous prototype for function 'xfs_symlink_hdr_ok' [-Wmissing-prototypes]
xfs_symlink_hdr_ok(
^
fs/xfs/libxfs/xfs_symlink_remote.c:67:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:167:1: warning: no previous prototype for function 'xfs_symlink_local_to_remote' [-Wmissing-prototypes]
xfs_symlink_local_to_remote(
^
fs/xfs/libxfs/xfs_symlink_remote.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:206:1: warning: no previous prototype for function 'xfs_symlink_shortform_verify' [-Wmissing-prototypes]
xfs_symlink_shortform_verify(
^
fs/xfs/libxfs/xfs_symlink_remote.c:205:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
xfs_failaddr_t
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:239:1: warning: no previous prototype for function 'xfs_symlink_remote_read' [-Wmissing-prototypes]
xfs_symlink_remote_read(
^
fs/xfs/libxfs/xfs_symlink_remote.c:238:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
fs/xfs/libxfs/xfs_symlink_remote.c:311:1: warning: no previous prototype for function 'xfs_symlink_write_target' [-Wmissing-prototypes]
xfs_symlink_write_target(
^
fs/xfs/libxfs/xfs_symlink_remote.c:310:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:387:1: warning: no previous prototype for function 'xfs_symlink_remote_truncate' [-Wmissing-prototypes]
xfs_symlink_remote_truncate(
^
fs/xfs/libxfs/xfs_symlink_remote.c:386:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
8 warnings generated.


vim +/xfs_symlink_remote_truncate +387 fs/xfs/libxfs/xfs_symlink_remote.c

308
309 /* Write the symlink target into the inode. */
310 int
> 311 xfs_symlink_write_target(
312 struct xfs_trans *tp,
313 struct xfs_inode *ip,
314 const char *target_path,
315 int pathlen,
316 xfs_fsblock_t fs_blocks,
317 uint resblks)
318 {
319 struct xfs_bmbt_irec mval[XFS_SYMLINK_MAPS];
320 struct xfs_mount *mp = tp->t_mountp;
321 const char *cur_chunk;
322 struct xfs_buf *bp;
323 xfs_daddr_t d;
324 int byte_cnt;
325 int nmaps;
326 int offset = 0;
327 int n;
328 int error;
329
330 /*
331 * If the symlink will fit into the inode, write it inline.
332 */
333 if (pathlen <= XFS_IFORK_DSIZE(ip)) {
334 xfs_init_local_fork(ip, XFS_DATA_FORK, target_path, pathlen);
335
336 ip->i_disk_size = pathlen;
337 ip->i_df.if_format = XFS_DINODE_FMT_LOCAL;
338 xfs_trans_log_inode(tp, ip, XFS_ILOG_DDATA | XFS_ILOG_CORE);
339 return 0;
340 }
341
342 nmaps = XFS_SYMLINK_MAPS;
343 error = xfs_bmapi_write(tp, ip, 0, fs_blocks, XFS_BMAPI_METADATA,
344 resblks, mval, &nmaps);
345 if (error)
346 return error;
347
348 ip->i_disk_size = pathlen;
349 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
350
351 cur_chunk = target_path;
352 offset = 0;
353 for (n = 0; n < nmaps; n++) {
354 char *buf;
355
356 d = XFS_FSB_TO_DADDR(mp, mval[n].br_startblock);
357 byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount);
358 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d,
359 BTOBB(byte_cnt), 0, &bp);
360 if (error)
361 return error;
362 bp->b_ops = &xfs_symlink_buf_ops;
363
364 byte_cnt = XFS_SYMLINK_BUF_SPACE(mp, byte_cnt);
365 byte_cnt = min(byte_cnt, pathlen);
366
367 buf = bp->b_addr;
368 buf += xfs_symlink_hdr_set(mp, ip->i_ino, offset, byte_cnt,
369 bp);
370
371 memcpy(buf, cur_chunk, byte_cnt);
372
373 cur_chunk += byte_cnt;
374 pathlen -= byte_cnt;
375 offset += byte_cnt;
376
377 xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF);
378 xfs_trans_log_buf(tp, bp, 0, (buf + byte_cnt - 1) -
379 (char *)bp->b_addr);
380 }
381 ASSERT(pathlen == 0);
382 return 0;
383 }
384
385 /* Remove all the blocks from a symlink and invalidate buffers. */
386 int
> 387 xfs_symlink_remote_truncate(

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2021-12-16 15:17    [W:0.093 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site