From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE2C5C19F2A for ; Sun, 7 Aug 2022 04:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbiHGEl1 (ORCPT ); Sun, 7 Aug 2022 00:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiHGElX (ORCPT ); Sun, 7 Aug 2022 00:41:23 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CB96B7E2 for ; Sat, 6 Aug 2022 21:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659847282; x=1691383282; h=date:from:to:cc:subject:message-id:mime-version; bh=eSiOzzsHCWX8b4rTu/YlQmx29RViv4p5fHNT6ckBTnc=; b=OxHS+fBlitZNGWVkhE5rzbKSisB9uATvWFyLcQFxfOYxSLq/8qnhuGep VkrUnXUC+Aogl9zRCvURMvLXaKTRNKAGPuGipeMAf7G6CdRHljtblroRh e4rheusqQsitedivJ+W8uph86Cx0N481Z7bGTW5br4JHm5LF9o0GzfC60 u1tG4dEKCRPwXF1DhXVo3fx4xA3gMsjTMLjmXHNOFyrsx3nJIjhZjp+UD ZsCnvjsCtRgGvyrf4Oy84rioEsgXlO2LnTl9UHBACZGGn804Vq7q+Ni0w 72bYZ9VN5EdTgJiq4ryMf13l+CsVh2DoBDXd3blSR4uTYVI64MZtO/Wzb g==; X-IronPort-AV: E=McAfee;i="6400,9594,10431"; a="291639406" X-IronPort-AV: E=Sophos;i="5.93,219,1654585200"; d="scan'208";a="291639406" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2022 21:41:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,219,1654585200"; d="scan'208";a="636921616" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 06 Aug 2022 21:41:20 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oKY6J-000KyR-1t; Sun, 07 Aug 2022 04:41:19 +0000 Date: Sun, 7 Aug 2022 12:41:03 +0800 From: kernel test robot To: Pavel Begunkov Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Jens Axboe Subject: io_uring/poll.c:819:40: sparse: sparse: incorrect type in argument 2 (different base types) Message-ID: <202208071239.6zgknmQ9-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 1612c382ffbdf1f673caec76502b1c00e6d35363 commit: 063a007996bf725ba4c7d8741701670be9858300 io_uring: change arm poll return values date: 13 days ago config: alpha-randconfig-s042-20220804 (https://download.01.org/0day-ci/archive/20220807/202208071239.6zgknmQ9-lkp@intel.com/config) compiler: alpha-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=063a007996bf725ba4c7d8741701670be9858300 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 063a007996bf725ba4c7d8741701670be9858300 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) io_uring/poll.c: note: in included file (through io_uring/io_uring.h): io_uring/slist.h:138:29: sparse: sparse: no newline at end of file io_uring/poll.c:222:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected signed int [usertype] res @@ got restricted __poll_t @@ io_uring/poll.c:222:38: sparse: expected signed int [usertype] res io_uring/poll.c:222:38: sparse: got restricted __poll_t io_uring/poll.c:233:56: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:232:66: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got unsigned int @@ io_uring/poll.c:232:66: sparse: expected restricted __poll_t [usertype] val io_uring/poll.c:232:66: sparse: got unsigned int io_uring/poll.c:232:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned short @@ io_uring/poll.c:232:52: sparse: expected restricted __poll_t [usertype] mask io_uring/poll.c:232:52: sparse: got unsigned short io_uring/poll.c:236:46: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected signed int [usertype] res @@ got restricted __poll_t [usertype] mask @@ io_uring/poll.c:236:46: sparse: expected signed int [usertype] res io_uring/poll.c:236:46: sparse: got restricted __poll_t [usertype] mask io_uring/poll.c:264:63: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:264:57: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __poll_t [usertype] val @@ got unsigned int @@ io_uring/poll.c:264:57: sparse: expected restricted __poll_t [usertype] val io_uring/poll.c:264:57: sparse: got unsigned int io_uring/poll.c:372:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [usertype] mask @@ io_uring/poll.c:372:40: sparse: expected int mask io_uring/poll.c:372:40: sparse: got restricted __poll_t [usertype] mask io_uring/poll.c:491:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@ io_uring/poll.c:491:40: sparse: expected int mask io_uring/poll.c:491:40: sparse: got restricted __poll_t [assigned] [usertype] mask io_uring/poll.c:543:45: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:543:43: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __poll_t [usertype] mask @@ got unsigned int @@ io_uring/poll.c:543:43: sparse: expected restricted __poll_t [usertype] mask io_uring/poll.c:543:43: sparse: got unsigned int io_uring/poll.c:588:38: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int mask @@ got restricted __poll_t [assigned] [usertype] mask @@ io_uring/poll.c:588:38: sparse: expected int mask io_uring/poll.c:588:38: sparse: got restricted __poll_t [assigned] [usertype] mask io_uring/poll.c:588:55: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int events @@ got restricted __poll_t [usertype] events @@ io_uring/poll.c:588:55: sparse: expected int events io_uring/poll.c:588:55: sparse: got restricted __poll_t [usertype] events io_uring/poll.c:745:24: sparse: sparse: invalid assignment: |= io_uring/poll.c:745:24: sparse: left side has type unsigned int io_uring/poll.c:745:24: sparse: right side has type restricted __poll_t io_uring/poll.c:747:24: sparse: sparse: invalid assignment: |= io_uring/poll.c:747:24: sparse: left side has type unsigned int io_uring/poll.c:747:24: sparse: right side has type restricted __poll_t io_uring/poll.c:749:55: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:748:29: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:748:38: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got unsigned int @@ io_uring/poll.c:748:38: sparse: expected restricted __poll_t io_uring/poll.c:748:38: sparse: got unsigned int >> io_uring/poll.c:819:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected signed int [usertype] res @@ got restricted __poll_t [addressable] [assigned] [usertype] result_mask @@ io_uring/poll.c:819:40: sparse: expected signed int [usertype] res io_uring/poll.c:819:40: sparse: got restricted __poll_t [addressable] [assigned] [usertype] result_mask io_uring/poll.c:873:38: sparse: sparse: invalid assignment: &= io_uring/poll.c:873:38: sparse: left side has type restricted __poll_t io_uring/poll.c:873:38: sparse: right side has type int io_uring/poll.c:874:52: sparse: sparse: restricted __poll_t degrades to integer io_uring/poll.c:874:38: sparse: sparse: invalid assignment: |= io_uring/poll.c:874:38: sparse: left side has type restricted __poll_t io_uring/poll.c:874:38: sparse: right side has type unsigned int io_uring/poll.c:632:24: sparse: sparse: context imbalance in 'io_poll_find' - wrong count at exit io_uring/poll.c:661:24: sparse: sparse: context imbalance in 'io_poll_file_find' - wrong count at exit io_uring/poll.c:716:28: sparse: sparse: context imbalance in '__io_poll_cancel' - unexpected unlock io_uring/poll.c:843:28: sparse: sparse: context imbalance in 'io_poll_remove' - unexpected unlock vim +819 io_uring/poll.c 798 799 int io_poll_add(struct io_kiocb *req, unsigned int issue_flags) 800 { 801 struct io_poll *poll = io_kiocb_to_cmd(req); 802 struct io_poll_table ipt; 803 int ret; 804 805 ipt.pt._qproc = io_poll_queue_proc; 806 807 /* 808 * If sqpoll or single issuer, there is no contention for ->uring_lock 809 * and we'll end up holding it in tw handlers anyway. 810 */ 811 if (!(issue_flags & IO_URING_F_UNLOCKED) && 812 (req->ctx->flags & (IORING_SETUP_SQPOLL | IORING_SETUP_SINGLE_ISSUER))) 813 req->flags |= REQ_F_HASH_LOCKED; 814 else 815 req->flags &= ~REQ_F_HASH_LOCKED; 816 817 ret = __io_arm_poll_handler(req, poll, &ipt, poll->events); 818 if (ret) { > 819 io_req_set_res(req, ipt.result_mask, 0); 820 return IOU_OK; 821 } 822 if (ipt.error) { 823 req_set_fail(req); 824 return ipt.error; 825 } 826 827 return IOU_ISSUE_SKIP_COMPLETE; 828 } 829 -- 0-DAY CI Kernel Test Service https://01.org/lkp