All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: Re: [PATCH v5 02/10] block: Add copy offload support infrastructure
Date: Wed, 7 Dec 2022 07:31:23 +0800	[thread overview]
Message-ID: <202212070713.93ZTSWtP-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "low confidence static check warning: block/blk-lib.c:464:6: warning: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization]"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20221123055827.26996-3-nj.shetty@samsung.com>
References: <20221123055827.26996-3-nj.shetty@samsung.com>
TO: Nitesh Shetty <nj.shetty@samsung.com>
TO: axboe@kernel.dk
TO: agk@redhat.com
TO: snitzer@kernel.org
TO: dm-devel@redhat.com
TO: kbusch@kernel.org
TO: hch@lst.de
TO: sagi@grimberg.me
TO: james.smart@broadcom.com
TO: kch@nvidia.com
TO: damien.lemoal@opensource.wdc.com
TO: naohiro.aota@wdc.com
TO: jth@kernel.org
TO: viro@zeniv.linux.org.uk
CC: linux-block@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-nvme@lists.infradead.org
CC: linux-fsdevel@vger.kernel.org
CC: anuj20.g@samsung.com
CC: joshi.k@samsung.com
CC: p.raghav@samsung.com
CC: nitheshshetty@gmail.com
CC: gost.dev@samsung.com
CC: Nitesh Shetty <nj.shetty@samsung.com>

Hi Nitesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on next-20221206]
[cannot apply to device-mapper-dm/for-next linus/master v6.1-rc8]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nitesh-Shetty/block-Introduce-queue-limits-for-copy-offload-support/20221123-145837
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20221123055827.26996-3-nj.shetty%40samsung.com
patch subject: [PATCH v5 02/10] block: Add copy offload support infrastructure
:::::: branch date: 2 weeks ago
:::::: commit date: 2 weeks ago
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout 101fd213e34571287d11546f15a89f06ae9b9746
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> block/blk-lib.c:464:6: warning: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization]
    ret = blk_copy_sanity_check(src_bdev, dst_bdev, ranges, nr);
        ^
   block/blk-lib.c:462:10: note: ret is initialized
    int ret = -EINVAL;
            ^
   block/blk-lib.c:464:6: note: ret is overwritten
    ret = blk_copy_sanity_check(src_bdev, dst_bdev, ranges, nr);
        ^

vim +/ret +464 block/blk-lib.c

101fd213e34571 Nitesh Shetty 2022-11-23  436  
101fd213e34571 Nitesh Shetty 2022-11-23  437  /*
101fd213e34571 Nitesh Shetty 2022-11-23  438   * blkdev_issue_copy - queue a copy
101fd213e34571 Nitesh Shetty 2022-11-23  439   * @src_bdev:	source block device
101fd213e34571 Nitesh Shetty 2022-11-23  440   * @dst_bdev:	destination block device
101fd213e34571 Nitesh Shetty 2022-11-23  441   * @ranges:	array of source/dest/len,
101fd213e34571 Nitesh Shetty 2022-11-23  442   *		ranges are expected to be allocated/freed by caller
101fd213e34571 Nitesh Shetty 2022-11-23  443   * @nr:		number of source ranges to copy
101fd213e34571 Nitesh Shetty 2022-11-23  444   * @end_io:	end_io function to be called on completion of copy operation,
101fd213e34571 Nitesh Shetty 2022-11-23  445   *		for synchronous operation this should be NULL
101fd213e34571 Nitesh Shetty 2022-11-23  446   * @private:	end_io function will be called with this private data, should be
101fd213e34571 Nitesh Shetty 2022-11-23  447   *		NULL, if operation is synchronous in nature
101fd213e34571 Nitesh Shetty 2022-11-23  448   * @gfp_mask:   memory allocation flags (for bio_alloc)
101fd213e34571 Nitesh Shetty 2022-11-23  449   *
101fd213e34571 Nitesh Shetty 2022-11-23  450   * Description:
101fd213e34571 Nitesh Shetty 2022-11-23  451   *	Copy source ranges from source block device to destination block
101fd213e34571 Nitesh Shetty 2022-11-23  452   *	device. length of a source range cannot be zero. Max total length of
101fd213e34571 Nitesh Shetty 2022-11-23  453   *	copy is limited to MAX_COPY_TOTAL_LENGTH and also maximum number of
101fd213e34571 Nitesh Shetty 2022-11-23  454   *	entries is limited to MAX_COPY_NR_RANGE
101fd213e34571 Nitesh Shetty 2022-11-23  455   */
101fd213e34571 Nitesh Shetty 2022-11-23  456  int blkdev_issue_copy(struct block_device *src_bdev,
101fd213e34571 Nitesh Shetty 2022-11-23  457  	struct block_device *dst_bdev, struct range_entry *ranges, int nr,
101fd213e34571 Nitesh Shetty 2022-11-23  458  	cio_iodone_t end_io, void *private, gfp_t gfp_mask)
101fd213e34571 Nitesh Shetty 2022-11-23  459  {
101fd213e34571 Nitesh Shetty 2022-11-23  460  	struct request_queue *src_q = bdev_get_queue(src_bdev);
101fd213e34571 Nitesh Shetty 2022-11-23  461  	struct request_queue *dst_q = bdev_get_queue(dst_bdev);
101fd213e34571 Nitesh Shetty 2022-11-23  462  	int ret = -EINVAL;
101fd213e34571 Nitesh Shetty 2022-11-23  463  
101fd213e34571 Nitesh Shetty 2022-11-23 @464  	ret = blk_copy_sanity_check(src_bdev, dst_bdev, ranges, nr);
101fd213e34571 Nitesh Shetty 2022-11-23  465  	if (ret)
101fd213e34571 Nitesh Shetty 2022-11-23  466  		return ret;
101fd213e34571 Nitesh Shetty 2022-11-23  467  
101fd213e34571 Nitesh Shetty 2022-11-23  468  	if (blk_check_copy_offload(src_q, dst_q))
101fd213e34571 Nitesh Shetty 2022-11-23  469  		ret = blk_copy_offload(src_bdev, dst_bdev, ranges, nr,
101fd213e34571 Nitesh Shetty 2022-11-23  470  				end_io, private, gfp_mask);
101fd213e34571 Nitesh Shetty 2022-11-23  471  
101fd213e34571 Nitesh Shetty 2022-11-23  472  	return ret;
101fd213e34571 Nitesh Shetty 2022-11-23  473  }
101fd213e34571 Nitesh Shetty 2022-11-23  474  EXPORT_SYMBOL_GPL(blkdev_issue_copy);
101fd213e34571 Nitesh Shetty 2022-11-23  475  

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

             reply	other threads:[~2022-12-06 23:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 23:31 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-02 16:45 [PATCH v5 02/10] block: Add copy offload support infrastructure kernel test robot
     [not found] <CGME20221123061017epcas5p246a589e20eac655ac340cfda6028ff35@epcas5p2.samsung.com>
2022-11-23  5:58 ` [dm-devel] [PATCH v5 00/10] Implement copy offload support Nitesh Shetty
2022-11-23  5:58   ` [PATCH v5 02/10] block: Add copy offload support infrastructure Nitesh Shetty
2022-11-23  8:04     ` Ming Lei
2022-11-23 10:07       ` Nitesh Shetty
2022-11-24  0:03         ` Ming Lei
2022-11-29 11:44           ` Nitesh Shetty
2022-12-07  5:54             ` Nitesh Shetty
2022-12-07 11:19               ` Ming Lei
2022-12-09  8:16                 ` Nitesh Shetty

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=202212070713.93ZTSWtP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@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.