All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:zcrx/next 3/5] io_uring/rsrc.c:1008:94: warning: format specifies type 'int' but the argument has type '__kernel_size_t' (aka 'unsigned long')
Date: Thu, 11 Apr 2024 17:13:24 +0800	[thread overview]
Message-ID: <202404111707.lIIxponM-lkp@intel.com> (raw)

tree:   https://github.com/isilence/linux zcrx/next
head:   145e80df1ac4e2380f8753660781bdc2c3350206
commit: 0fe9df64fe2bd74f7b4d92c0c9cfe55dc55e4ff8 [3/5] wip: bnxt
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240411/202404111707.lIIxponM-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240411/202404111707.lIIxponM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404111707.lIIxponM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from io_uring/rsrc.c:6:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> io_uring/rsrc.c:1008:94: warning: format specifies type 'int' but the argument has type '__kernel_size_t' (aka 'unsigned long') [-Wformat]
    1008 |                 printk("----- io_sqe_buffers_register: i=%d, iov_base=%px, iov_len=%d\n", i, iov.iov_base, iov.iov_len);
         |                                                                                    ~~                      ^~~~~~~~~~~
         |                                                                                    %lu
   include/linux/printk.h:457:60: note: expanded from macro 'printk'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   2 warnings generated.


vim +1008 io_uring/rsrc.c

   967	
   968	int io_sqe_buffers_register(struct io_ring_ctx *ctx, void __user *arg,
   969				    unsigned int nr_args, u64 __user *tags)
   970	{
   971		struct page *last_hpage = NULL;
   972		struct io_rsrc_data *data;
   973		int i, ret;
   974		struct iovec iov;
   975	
   976		BUILD_BUG_ON(IORING_MAX_REG_BUFFERS >= (1u << 16));
   977	
   978		if (ctx->user_bufs)
   979			return -EBUSY;
   980		if (!nr_args || nr_args > IORING_MAX_REG_BUFFERS)
   981			return -EINVAL;
   982		ret = io_rsrc_data_alloc(ctx, IORING_RSRC_BUFFER, tags, nr_args, &data);
   983		if (ret)
   984			return ret;
   985		ret = io_buffers_map_alloc(ctx, nr_args);
   986		if (ret) {
   987			io_rsrc_data_free(data);
   988			return ret;
   989		}
   990	
   991		for (i = 0; i < nr_args; i++, ctx->nr_user_bufs++) {
   992			if (arg) {
   993				ret = io_copy_iov(ctx, &iov, arg, i);
   994				if (ret)
   995					break;
   996				ret = io_buffer_validate(&iov);
   997				if (ret)
   998					break;
   999			} else {
  1000				memset(&iov, 0, sizeof(iov));
  1001			}
  1002	
  1003			if (!iov.iov_base && *io_get_tag_slot(data, i)) {
  1004				ret = -EINVAL;
  1005				break;
  1006			}
  1007	
> 1008			printk("----- io_sqe_buffers_register: i=%d, iov_base=%px, iov_len=%d\n", i, iov.iov_base, iov.iov_len);
  1009			ret = io_sqe_buffer_register(ctx, &iov, &ctx->user_bufs[i],
  1010						     &last_hpage);
  1011			if (ret)
  1012				break;
  1013		}
  1014	
  1015		WARN_ON_ONCE(ctx->buf_data);
  1016	
  1017		ctx->buf_data = data;
  1018		if (ret)
  1019			__io_sqe_buffers_unregister(ctx);
  1020		return ret;
  1021	}
  1022	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-04-11  9:14 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 \
    --in-reply-to=202404111707.lIIxponM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.