All of lore.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>
Cc: oe-kbuild-all@lists.linux.dev, target-devel@vger.kernel.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: Sun, 28 May 2023 03:50:53 +0800	[thread overview]
Message-ID: <202305280314.CoHoeIlx-lkp@intel.com> (raw)
In-Reply-To: <20230517141537.80936-3-k.shelekhin@yadro.com>

Hi Konstantin,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on linus/master v6.4-rc3]
[cannot apply to next-20230525]
[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/Konstantin-Shelekhin/scsi-target-core-Add-sense-reason-for-space-allocation-errors/20230517-221755
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20230517141537.80936-3-k.shelekhin%40yadro.com
patch subject: [PATCH 2/2] scsi: target: iblock: Report space allocation errors
config: sparc-randconfig-s043-20230517 (https://download.01.org/0day-ci/archive/20230528/202305280314.CoHoeIlx-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 12.1.0
reproduce:
        mkdir -p ~/bin
        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://github.com/intel-lab-lkp/linux/commit/a1c912b7cd68155b131113eae148f7f79ef93676
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Konstantin-Shelekhin/scsi-target-core-Add-sense-reason-for-space-allocation-errors/20230517-221755
        git checkout a1c912b7cd68155b131113eae148f7f79ef93676
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/target/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305280314.CoHoeIlx-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_iblock.c:333: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:333:57: sparse:     expected restricted blk_status_t [usertype] status
   drivers/target/target_core_iblock.c:333:57: sparse:     got int
>> drivers/target/target_core_iblock.c:354: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:354:61: sparse:     expected int new
   drivers/target/target_core_iblock.c:354:61: sparse:     got restricted blk_status_t [usertype] bi_status

vim +333 drivers/target/target_core_iblock.c

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

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

  parent reply	other threads:[~2023-05-27 19:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 14:15 [PATCH 0/2] scsi: target: iblock: Report space allocation errors Konstantin Shelekhin
2023-05-17 14:15 ` [PATCH 1/2] scsi: target: core: Add sense reason for " Konstantin Shelekhin
2023-05-17 14:15 ` [PATCH 2/2] scsi: target: iblock: Report " 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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-20 18:43 [PATCH 0/2] " Konstantin Shelekhin
2021-10-20 18:43 ` [PATCH 2/2] " Konstantin Shelekhin
2021-10-22  5:27   ` kernel test robot
2021-10-22  5:27     ` kernel test robot
2021-11-08  9:59   ` kernel test robot
2021-11-08  9:59     ` kernel test robot
2021-11-23 13:29   ` kernel test robot
2021-11-23 13:29     ` kernel test robot
2021-11-25  2:36   ` kernel test robot
2021-11-25  2:36     ` kernel test robot
2021-11-25  7:26   ` kernel test robot
2021-11-25  7:26     ` 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=202305280314.CoHoeIlx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=d.bogdanov@yadro.com \
    --cc=k.shelekhin@yadro.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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 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.