public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kai Mäkisara" <Kai.Makisara@kolumbus.fi>,
	linux-scsi@vger.kernel.org, dgilbert@interlog.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	martin.petersen@oracle.com,
	James.Bottomley@hansenpartnership.com, jmeneghi@redhat.com,
	"Kai Mäkisara" <Kai.Makisara@kolumbus.fi>
Subject: Re: [PATCH v1 3/7] scsi: scsi_debug: Add write support with block lengths and 4 bytes of data
Date: Tue, 11 Feb 2025 21:08:37 +0800	[thread overview]
Message-ID: <202502112016.6zs2FpD6-lkp@intel.com> (raw)
In-Reply-To: <20250210191232.185207-4-Kai.Makisara@kolumbus.fi>

Hi Kai,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v6.14-rc2 next-20250210]
[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/Kai-M-kisara/scsi-scsi_debug-First-fixes-for-tapes/20250211-031623
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20250210191232.185207-4-Kai.Makisara%40kolumbus.fi
patch subject: [PATCH v1 3/7] scsi: scsi_debug: Add write support with block lengths and 4 bytes of data
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20250211/202502112016.6zs2FpD6-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502112016.6zs2FpD6-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/202502112016.6zs2FpD6-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/scsi/scsi_debug.c:31:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2224:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_debug.c:2985:3: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
    2985 |                 len += resp_partition_m_pg(ap, pcontrol, target);
         |                 ^~~
   drivers/scsi/scsi_debug.c:2850:28: note: initialize the variable 'len' to silence this warning
    2850 |         u32 alloc_len, offset, len;
         |                                   ^
         |                                    = 0
>> drivers/scsi/scsi_debug.c:3378:10: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
    3378 |         for ( ; i < TAPE_MAX_PARTITIONS; i++)
         |                 ^
   drivers/scsi/scsi_debug.c:3367:7: note: initialize the variable 'i' to silence this warning
    3367 |         int i;
         |              ^
         |               = 0
   5 warnings generated.


vim +/i +3378 drivers/scsi/scsi_debug.c

  3363	
  3364	static int partition_tape(struct sdebug_dev_info *devip, int nbr_partitions,
  3365				int part_0_size, int part_1_size)
  3366	{
  3367		int i;
  3368	
  3369		if (part_0_size + part_1_size > TAPE_UNITS)
  3370			return -1;
  3371		devip->tape_eop[0] = part_0_size;
  3372		devip->tape_blocks[0]->fl_size = TAPE_BLOCK_EOD_FLAG;
  3373		devip->tape_eop[1] = part_1_size;
  3374		devip->tape_blocks[1] = devip->tape_blocks[0] +
  3375				devip->tape_eop[0];
  3376		devip->tape_blocks[1]->fl_size = TAPE_BLOCK_EOD_FLAG;
  3377	
> 3378		for ( ; i < TAPE_MAX_PARTITIONS; i++)
  3379			devip->tape_location[i] = 0;
  3380	
  3381		devip->tape_nbr_partitions = nbr_partitions;
  3382		devip->tape_partition = 0;
  3383	
  3384		partition_pg[3] = nbr_partitions - 1;
  3385		put_unaligned_be16(devip->tape_eop[0], partition_pg + 8);
  3386		put_unaligned_be16(devip->tape_eop[1], partition_pg + 10);
  3387	
  3388		return nbr_partitions;
  3389	}
  3390	

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

  reply	other threads:[~2025-02-11 13:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 19:12 [PATCH v1 0/7] scsi: scsi_debug: Add more tape support Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 1/7] scsi: scsi_debug: First fixes for tapes Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 2/7] scsi: scsi_debug: Add READ BLOCK LIMITS and modify LOAD " Kai Mäkisara
2025-02-11 10:41   ` kernel test robot
2025-02-11 14:11   ` [PATCH v1b " Kai Mäkisara
2025-02-13  3:11     ` Martin K. Petersen
2025-02-10 19:12 ` [PATCH v1 3/7] scsi: scsi_debug: Add write support with block lengths and 4 bytes of data Kai Mäkisara
2025-02-11 13:08   ` kernel test robot [this message]
2025-02-11 14:11   ` [PATCH v1b " Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 4/7] scsi: scsi_debug: Add read support and update locate for tapes Kai Mäkisara
2025-02-11 15:50   ` kernel test robot
2025-02-11 21:26   ` [PATCH v1b " Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 5/7] scsi: scsi_debug: Add compression mode page " Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 6/7] scsi: scsi_debug: Reset tape setting at device reset Kai Mäkisara
2025-02-10 19:12 ` [PATCH v1 7/7] scsi: scsi_debug: Add support for partitioning the tape Kai Mäkisara

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=202502112016.6zs2FpD6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=dgilbert@interlog.com \
    --cc=jmeneghi@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox