public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Konstantin Shelekhin <k.shelekhin@yadro.com>,
	Martin Petersen <martin.petersen@oracle.com>,
	Mike Christie <michael.christie@oracle.com>,
	target-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
	linux@yadro.com, Konstantin Shelekhin <k.shelekhin@yadro.com>,
	Dmitry Bogdanov <d.bogdanov@yadro.com>
Subject: Re: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
Date: Tue, 23 Nov 2021 21:29:49 +0800	[thread overview]
Message-ID: <202111232117.VwHDjjtU-lkp@intel.com> (raw)
In-Reply-To: <20211020184319.588002-3-k.shelekhin@yadro.com>

Hi Konstantin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.16-rc2 next-20211123]
[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]

url:    https://github.com/0day-ci/linux/commits/Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-s001-20211021 (https://download.01.org/0day-ci/archive/20211123/202111232117.VwHDjjtU-lkp@intel.com/config.gz)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/15d4d8f9601b04ee21f8f6042481828c4c34f6b7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-iblock-Report-space-allocation-errors/20211021-024526
        git checkout 15d4d8f9601b04ee21f8f6042481828c4c34f6b7
        # save the config file to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:329:57: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted blk_status_t [usertype] status @@     got int @@
   drivers/target/target_core_iblock.c:329:57: sparse:     expected restricted blk_status_t [usertype] status
   drivers/target/target_core_iblock.c:329:57: sparse:     got int
>> drivers/target/target_core_iblock.c:351:61: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected int new @@     got restricted blk_status_t [usertype] bi_status @@
   drivers/target/target_core_iblock.c:351:61: sparse:     expected int new
   drivers/target/target_core_iblock.c:351:61: sparse:     got restricted blk_status_t [usertype] bi_status

vim +329 drivers/target/target_core_iblock.c

   319	
   320	static void iblock_complete_cmd(struct se_cmd *cmd)
   321	{
   322		struct iblock_req *ibr = cmd->priv;
   323		u8 status;
   324		sense_reason_t reason;
   325	
   326		if (!refcount_dec_and_test(&ibr->pending))
   327			return;
   328	
 > 329		reason = iblock_blk_status_to_reason(atomic_read(&ibr->status));
   330	
   331		if (reason != TCM_NO_SENSE)
   332			status = SAM_STAT_CHECK_CONDITION;
   333		else
   334			status = SAM_STAT_GOOD;
   335	
   336		target_complete_cmd_with_sense(cmd, status, reason);
   337		kfree(ibr);
   338	}
   339	
   340	static void iblock_bio_done(struct bio *bio)
   341	{
   342		struct se_cmd *cmd = bio->bi_private;
   343		struct iblock_req *ibr = cmd->priv;
   344	
   345		if (bio->bi_status) {
   346			pr_err("bio error: %p,  err: %d\n", bio, bio->bi_status);
   347			/*
   348			 * Set the error status of the iblock request to the error
   349			 * status of the first failed bio.
   350			 */
 > 351			atomic_cmpxchg(&ibr->status, BLK_STS_OK, bio->bi_status);
   352			smp_mb__after_atomic();
   353		}
   354	
   355		bio_put(bio);
   356	
   357		iblock_complete_cmd(cmd);
   358	}
   359	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

  parent reply	other threads:[~2021-11-23 13:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 18:43 [PATCH 0/2] scsi: target: iblock: Report space allocation errors Konstantin Shelekhin
2021-10-20 18:43 ` [PATCH 1/2] scsi: target: core: Add sense reason for " Konstantin Shelekhin
2021-10-21  3:21   ` Martin K. Petersen
2021-10-21  8:55     ` Konstantin Shelekhin
2021-10-20 18:43 ` [PATCH 2/2] scsi: target: iblock: Report " Konstantin Shelekhin
2021-10-22  5:27   ` kernel test robot
2021-11-08  9:59   ` kernel test robot
2021-11-23 13:29   ` kernel test robot [this message]
2021-11-25  2:36   ` kernel test robot
2021-11-25  7:26   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-05-17 14:15 [PATCH 0/2] " Konstantin Shelekhin
2023-05-17 14:15 ` [PATCH 2/2] " Konstantin Shelekhin
2023-05-19 18:05   ` kernel test robot
2023-05-20 18:05   ` Mike Christie
2023-05-21 18:28     ` Konstantin Shelekhin
2023-05-27 19:50   ` kernel test robot

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=202111232117.VwHDjjtU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=d.bogdanov@yadro.com \
    --cc=k.shelekhin@yadro.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /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