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 7A4C6C433EF for ; Wed, 16 Feb 2022 11:24:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231489AbiBPLYv (ORCPT ); Wed, 16 Feb 2022 06:24:51 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230134AbiBPLYt (ORCPT ); Wed, 16 Feb 2022 06:24:49 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 209462DF6 for ; Wed, 16 Feb 2022 03:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645010677; x=1676546677; h=date:from:to:cc:subject:message-id:mime-version; bh=SrVy68AUkmK2IOLXR54aG87xRVa7oOsYKgUT5PUQKDk=; b=bKXulL0pe/w9fd2nhIneBRUFkGl81jLqrHVTzcclh0APiio8ScyKxKuC Jh2Cy0UPSJ8ME5lW9ZrwAwTsRnehBWnnP5VUG7tR8ZeIeTi1mfI8nOLFy +q4alOXe3M5rw4KmDNBzbQSrp+FgAge80WiJQQblFYZ5IqyNaD0taV+Zr XcB7o6kp3TLJHJ9VSSK6+EKIupiUtBEe3OmrGH4v1imVOAMv+WUzBlwaW Bs2JW4N0e9dwm64WE8PHV1gEkDxRwcgP5i4Hc6GVtIrCj+6aic+ohnFLK ZzuAh7F/h3ApXINUA8VoVyKL7YN35CDNfh1oLWf58+0Y8LKpABt6Gtm5k Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="311322493" X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="311322493" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 03:24:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,373,1635231600"; d="scan'208";a="704267191" Received: from lkp-server01.sh.intel.com (HELO d95dc2dabeb1) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 16 Feb 2022 03:24:35 -0800 Received: from kbuild by d95dc2dabeb1 with local (Exim 4.92) (envelope-from ) id 1nKIQE-000Aki-Tg; Wed, 16 Feb 2022 11:24:34 +0000 Date: Wed, 16 Feb 2022 19:24:24 +0800 From: kernel test robot To: Pavel Begunkov Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Jens Axboe Subject: fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment] Message-ID: <202202161925.Sd1RTERz-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: c5d9ae265b105d9a67575fb67bd4650a6fc08e25 commit: a3dbdf54da80326fd12bc11ad75ecd699a82374f io_uring: refactor io_get_sequence() date: 8 months ago compiler: powerpc64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> kernel/irq/proc.c:357:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sprintf(name, "%d", irq); ^ >> fs/io_uring.c:5999:2: warning: Redundant assignment of 'req' to itself. [selfAssignment] io_for_each_link(req, req) ^ cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> kernel/irq/proc.c:357:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] sprintf(name, "%d", irq); ^ >> fs/io_uring.c:5305:19: warning: Uninitialized variable: req [uninitvar] if (sqe_addr != req->user_data) ^ fs/io_uring.c:5309:10: warning: Uninitialized variable: req [uninitvar] return req; ^ fs/io_uring.c:9491:46: warning: Uninitialized variable: req [uninitvar] seq_printf(m, " op=%d, task_works=%dn", req->opcode, ^ fs/io_uring.c:9492:6: warning: Uninitialized variable: req [uninitvar] req->task->task_works != NULL); ^ vim +/req +5999 fs/io_uring.c 5993 5994 static u32 io_get_sequence(struct io_kiocb *req) 5995 { 5996 u32 seq = req->ctx->cached_sq_head; 5997 5998 /* need original cached_sq_head, but it was increased for each req */ > 5999 io_for_each_link(req, req) 6000 seq--; 6001 return seq; 6002 } 6003 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org