public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mike Christie <michael.christie@oracle.com>,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH 1/1] scsi: target: Move LUN stats to per CPU
Date: Thu, 24 Jul 2025 22:26:13 +0800	[thread overview]
Message-ID: <202507242247.rt3StU9U-lkp@intel.com> (raw)
In-Reply-To: <20250724004558.40993-1-michael.christie@oracle.com>

Hi Mike,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next linus/master v6.16-rc7 next-20250724]
[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/Mike-Christie/scsi-target-Move-LUN-stats-to-per-CPU/20250724-084852
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20250724004558.40993-1-michael.christie%40oracle.com
patch subject: [PATCH 1/1] scsi: target: Move LUN stats to per CPU
config: sparc64-randconfig-001-20250724 (https://download.01.org/0day-ci/archive/20250724/202507242247.rt3StU9U-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250724/202507242247.rt3StU9U-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507242247.rt3StU9U-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/target/target_core_tpg.c: In function 'core_tpg_alloc_lun':
>> drivers/target/target_core_tpg.c:612:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     int ret;
         ^~~


vim +/ret +612 drivers/target/target_core_tpg.c

   606	
   607	struct se_lun *core_tpg_alloc_lun(
   608		struct se_portal_group *tpg,
   609		u64 unpacked_lun)
   610	{
   611		struct se_lun *lun;
 > 612		int ret;
   613	
   614		lun = kzalloc(sizeof(*lun), GFP_KERNEL);
   615		if (!lun) {
   616			pr_err("Unable to allocate se_lun memory\n");
   617			return ERR_PTR(-ENOMEM);
   618		}
   619	
   620		lun->lun_stats = alloc_percpu(struct scsi_port_stats);
   621		if (!lun->lun_stats) {
   622			pr_err("Unable to allocate se_lun stats memory\n");
   623			ret = -ENOMEM;
   624			goto free_lun;
   625		}
   626	
   627		lun->unpacked_lun = unpacked_lun;
   628		atomic_set(&lun->lun_acl_count, 0);
   629		init_completion(&lun->lun_shutdown_comp);
   630		INIT_LIST_HEAD(&lun->lun_deve_list);
   631		INIT_LIST_HEAD(&lun->lun_dev_link);
   632		atomic_set(&lun->lun_tg_pt_secondary_offline, 0);
   633		spin_lock_init(&lun->lun_deve_lock);
   634		mutex_init(&lun->lun_tg_pt_md_mutex);
   635		INIT_LIST_HEAD(&lun->lun_tg_pt_gp_link);
   636		spin_lock_init(&lun->lun_tg_pt_gp_lock);
   637		lun->lun_tpg = tpg;
   638	
   639		return lun;
   640	
   641	free_lun:
   642		kfree(lun);
   643		return ERR_PTR(-ENOMEM);
   644	}
   645	

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

  reply	other threads:[~2025-07-24 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  0:45 [PATCH 1/1] scsi: target: Move LUN stats to per CPU Mike Christie
2025-07-24 14:26 ` kernel test robot [this message]
2025-07-24 15:06 ` Bart Van Assche
2025-07-28 15:08 ` Dmitry Bogdanov

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=202507242247.rt3StU9U-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox