public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:axboe/linux-block/fastpoll-mshot 97/98] fs/io_uring.c:4743:11: warning: variable 'ret' is uninitialized when used here
Date: Mon, 9 May 2022 05:41:58 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/fastpoll-mshot
head:   883f288d64ca56518398dfa59bbdbfae1215ec03
commit: 8e0d731f259198aac32de79f7059d34b94fc0fb3 [97/98] io_uring: allow allocated fixed files for openat/openat2
config: riscv-buildonly-randconfig-r005-20220508 (https://download.01.org/0day-ci/archive/20220509/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a385645b470e2d3a1534aae618ea56b31177639f)
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://github.com/ammarfaizi2/linux-block/commit/8e0d731f259198aac32de79f7059d34b94fc0fb3
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block axboe/linux-block/fastpoll-mshot
        git checkout 8e0d731f259198aac32de79f7059d34b94fc0fb3
        # 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=riscv SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> fs/io_uring.c:4743:11: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                           return ret;
                                  ^~~
   fs/io_uring.c:4736:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   fs/io_uring.c:6174:2: error: call to undeclared function '__io_poll_clean'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           __io_poll_clean(req);
           ^
   fs/io_uring.c:6174:2: note: did you mean '__io_fill_cqe'?
   fs/io_uring.c:2166:20: note: '__io_fill_cqe' declared here
   static inline bool __io_fill_cqe(struct io_ring_ctx *ctx, u64 user_data,
                      ^
   1 warning and 1 error generated.


vim +/ret +4743 fs/io_uring.c

  4730	
  4731	static int io_fixed_file_install(struct io_kiocb *req, unsigned int issue_flags,
  4732					 struct file *file, unsigned int file_slot)
  4733	{
  4734		int alloc_slot = file_slot == UINT_MAX;
  4735		struct io_ring_ctx *ctx = req->ctx;
  4736		int ret;
  4737	
  4738		if (alloc_slot) {
  4739			io_ring_submit_lock(ctx, issue_flags);
  4740			file_slot = io_file_bitmap_get(ctx);
  4741			if (unlikely(file_slot < 0)) {
  4742				io_ring_submit_unlock(ctx, issue_flags);
> 4743				return ret;
  4744			}
  4745		}
  4746	
  4747		ret = io_install_fixed_file(req, file, issue_flags, file_slot);
  4748		if (alloc_slot) {
  4749			io_ring_submit_unlock(ctx, issue_flags);
  4750			return file_slot;
  4751		}
  4752	
  4753		return ret;
  4754	}
  4755	

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

                 reply	other threads:[~2022-05-08 21:42 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] \
    [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