public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:axboe/linux-block/for-5.20/io_uring 36/40] io_uring/splice.c:42:5: warning: no previous prototype for 'io_tee_prep'
Date: Wed, 25 May 2022 13:59:29 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-5.20/io_uring
head:   9da4fba4e0165c5e40d689eb5d34b73d780bf067
commit: 22eadf221928100134978b69655f0cf37466e30a [36/40] io_uring: split out splice related operations
config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20220525/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/ammarfaizi2/linux-block/commit/22eadf221928100134978b69655f0cf37466e30a
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block axboe/linux-block/for-5.20/io_uring
        git checkout 22eadf221928100134978b69655f0cf37466e30a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> io_uring/splice.c:42:5: warning: no previous prototype for 'io_tee_prep' [-Wmissing-prototypes]
      42 | int io_tee_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
         |     ^~~~~~~~~~~
>> io_uring/splice.c:49:5: warning: no previous prototype for 'io_tee' [-Wmissing-prototypes]
      49 | int io_tee(struct io_kiocb *req, unsigned int issue_flags)
         |     ^~~~~~
>> io_uring/splice.c:81:5: warning: no previous prototype for 'io_splice_prep' [-Wmissing-prototypes]
      81 | int io_splice_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
         |     ^~~~~~~~~~~~~~
>> io_uring/splice.c:90:5: warning: no previous prototype for 'io_splice' [-Wmissing-prototypes]
      90 | int io_splice(struct io_kiocb *req, unsigned int issue_flags)
         |     ^~~~~~~~~


vim +/io_tee_prep +42 io_uring/splice.c

    41	
  > 42	int io_tee_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
    43	{
    44		if (READ_ONCE(sqe->splice_off_in) || READ_ONCE(sqe->off))
    45			return -EINVAL;
    46		return __io_splice_prep(req, sqe);
    47	}
    48	
  > 49	int io_tee(struct io_kiocb *req, unsigned int issue_flags)
    50	{
    51		struct io_splice *sp = io_kiocb_to_cmd(req);
    52		struct file *out = sp->file_out;
    53		unsigned int flags = sp->flags & ~SPLICE_F_FD_IN_FIXED;
    54		struct file *in;
    55		long ret = 0;
    56	
    57		if (issue_flags & IO_URING_F_NONBLOCK)
    58			return -EAGAIN;
    59	
    60		if (sp->flags & SPLICE_F_FD_IN_FIXED)
    61			in = io_file_get_fixed(req, sp->splice_fd_in, issue_flags);
    62		else
    63			in = io_file_get_normal(req, sp->splice_fd_in);
    64		if (!in) {
    65			ret = -EBADF;
    66			goto done;
    67		}
    68	
    69		if (sp->len)
    70			ret = do_tee(in, out, sp->len, flags);
    71	
    72		if (!(sp->flags & SPLICE_F_FD_IN_FIXED))
    73			io_put_file(in);
    74	done:
    75		if (ret != sp->len)
    76			req_set_fail(req);
    77		io_req_set_res(req, ret, 0);
    78		return IOU_OK;
    79	}
    80	
  > 81	int io_splice_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
    82	{
    83		struct io_splice *sp = io_kiocb_to_cmd(req);
    84	
    85		sp->off_in = READ_ONCE(sqe->splice_off_in);
    86		sp->off_out = READ_ONCE(sqe->off);
    87		return __io_splice_prep(req, sqe);
    88	}
    89	
  > 90	int io_splice(struct io_kiocb *req, unsigned int issue_flags)

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

                 reply	other threads:[~2022-05-25  5:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox