public inbox for [email protected]
 help / color / mirror / Atom feed
* [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 59/61] fs/netfs/buffered_write.c:815:9: warning: no previous prototype for function 'netfs_file_write_iter_locked'
@ 2022-07-01 21:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-01 21:20 UTC (permalink / raw)
  To: Jeff Layton
  Cc: llvm, kbuild-all, GNU/Weeb Mailing List, linux-kernel,
	David Howells

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head:   ce4670495468b797b0c5927fcb661bc0da48b9ab
commit: e237ecdc44f74b59d00230cc4e6e8067a4bed176 [59/61] netfs: add new buffered/direct exclusive locking scheme
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220702/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a9119143a2d1f4d0d0bc1fe0d819e5351b4e0deb)
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/ammarfaizi2/linux-block/commit/e237ecdc44f74b59d00230cc4e6e8067a4bed176
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-linked-list
        git checkout e237ecdc44f74b59d00230cc4e6e8067a4bed176
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/netfs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> fs/netfs/buffered_write.c:815:9: warning: no previous prototype for function 'netfs_file_write_iter_locked' [-Wmissing-prototypes]
   ssize_t netfs_file_write_iter_locked(struct kiocb *iocb, struct iov_iter *from)
           ^
   fs/netfs/buffered_write.c:815:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   ssize_t netfs_file_write_iter_locked(struct kiocb *iocb, struct iov_iter *from)
   ^
   static 
   fs/netfs/buffered_write.c:23:20: warning: unused function 'netfs_pgoff_before_touch' [-Wunused-function]
   static inline bool netfs_pgoff_before_touch(pgoff_t a, pgoff_t b)
                      ^
   2 warnings generated.


vim +/netfs_file_write_iter_locked +815 fs/netfs/buffered_write.c

   801	
   802	/**
   803	 * netfs_file_write_iter_locked - write data to a file
   804	 * @iocb:	IO state structure
   805	 * @from:	iov_iter with data to write
   806	 *
   807	 * This is a wrapper around __generic_file_write_iter() to be used by most
   808	 * filesystems that want to deal with the locking themselves. It takes care
   809	 * of syncing the file in case of O_SYNC.
   810	 * Return:
   811	 * * negative error code if no data has been written at all of
   812	 *   vfs_fsync_range() failed for a synchronous write
   813	 * * number of bytes written, even for truncated writes
   814	 */
 > 815	ssize_t netfs_file_write_iter_locked(struct kiocb *iocb, struct iov_iter *from)
   816	{
   817		struct file *file = iocb->ki_filp;
   818		struct inode *inode = file->f_mapping->host;
   819		struct netfs_inode *ctx = netfs_inode(inode);
   820		ssize_t ret;
   821	
   822		_enter("%llx,%zx,%llx", iocb->ki_pos, iov_iter_count(from), i_size_read(inode));
   823	
   824		ret = generic_write_checks(iocb, from);
   825		if (ret <= 0)
   826			return ret;
   827	
   828		trace_netfs_write_iter(iocb, from);
   829	
   830		/* We can write back this queue in page reclaim */
   831		current->backing_dev_info = inode_to_bdi(inode);
   832		ret = file_remove_privs(file);
   833		if (ret)
   834			goto error;
   835	
   836		ret = file_update_time(file);
   837		if (ret)
   838			goto error;
   839	
   840		ret = netfs_flush_conflicting_writes(ctx, file, iocb->ki_pos,
   841						     iov_iter_count(from), NULL);
   842		if (ret < 0 && ret != -EAGAIN)
   843			goto error;
   844	
   845		if (iocb->ki_flags & IOCB_DIRECT)
   846			ret = netfs_direct_write_iter(iocb, from);
   847		else
   848			ret = netfs_perform_write(iocb, from);
   849	
   850	error:
   851		/* TODO: Wait for DSYNC region here. */
   852		current->backing_dev_info = NULL;
   853		return ret;
   854	}
   855	EXPORT_SYMBOL(netfs_file_write_iter_locked);
   856	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-01 21:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-01 21:20 [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 59/61] fs/netfs/buffered_write.c:815:9: warning: no previous prototype for function 'netfs_file_write_iter_locked' 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