Re: [PATCH v1 3/6] mpi3mr: Dump driver and dmesg logs into driver diag buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ranjan,

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.9 next-20240515]
[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/Ranjan-Kumar/mpi3mr-HDB-allocation-and-posting-for-hardware-and-Firmware-buffers/20240514-223346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20240514142858.51992-4-ranjan.kumar%40broadcom.com
patch subject: [PATCH v1 3/6] mpi3mr: Dump driver and dmesg logs into driver diag buffer
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240515/202405151829.zc0uNh0u-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240515/202405151829.zc0uNh0u-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405151829.zc0uNh0u-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/scsi/mpi3mr/mpi3mr_fw.c:1214: warning: Excess function parameter 'prev_offset' description in 'mpi3mr_do_mini_dump'


vim +1214 drivers/scsi/mpi3mr/mpi3mr_fw.c

  1202	
  1203	/**
  1204	 * mpi3mr_do_mini_dump - copy system logs associated with mrioc.
  1205	 * @mrioc: Adapter instance reference
  1206	 * @prev_offset: offset returned from previous operation
  1207	 *
  1208	 * Read system logs and search for pattern mpi3mr%d and copy the lines
  1209	 * into driver diag buffer
  1210	 *
  1211	 * Return: next available location in driver diag buffer.
  1212	 */
  1213	static int mpi3mr_do_mini_dump(struct mpi3mr_ioc *mrioc)
> 1214	{
  1215		int n = 0, lines, pos_mini_dump = 0;
  1216		struct mpi3mr_kmsg_dumper dumper;
  1217		size_t len;
  1218		char buf[201];
  1219		char *mini_start = "<6> Minidump start\n";
  1220		char *mini_end = "<6> Minidump end\n";
  1221	
  1222		struct mpi3_driver_buffer_header *drv_buff_header = NULL;
  1223	
  1224		dumper = mrioc->dump;
  1225	
  1226		kmsg_dump_rewind(&dumper.kdumper);
  1227		while (kmsg_dump_get_line(&dumper.kdumper, 1, NULL, 0, NULL))
  1228			n++;
  1229	
  1230		lines = n;
  1231		kmsg_dump_rewind(&dumper.kdumper);
  1232	
  1233		drv_buff_header = (struct mpi3_driver_buffer_header *)mrioc->drv_diag_buffer;
  1234		drv_buff_header->signature = 0x43495243;
  1235		drv_buff_header->logical_buffer_start = 0;
  1236		drv_buff_header->circular_buffer_size =
  1237			mrioc->drv_diag_buffer_sz - sizeof(struct mpi3_driver_buffer_header);
  1238		drv_buff_header->flags =
  1239			MPI3_DRIVER_DIAG_BUFFER_HEADER_FLAGS_CIRCULAR_BUF_FORMAT_ASCII;
  1240	
  1241		if ((pos_mini_dump + strlen(mini_start)
  1242				    < mrioc->drv_diag_buffer_sz)) {
  1243			sprintf((char *)mrioc->drv_diag_buffer + pos_mini_dump,
  1244				"%s\n", mini_start);
  1245			pos_mini_dump += strlen(mini_start);
  1246		} else {
  1247			ioc_info(mrioc, "driver diag buffer is full. minidump is not started\n");
  1248			goto out;
  1249		}
  1250	
  1251		while (kmsg_dump_get_line(&dumper.kdumper, 1, buf, sizeof(buf), &len)) {
  1252			if (!lines--)
  1253				break;
  1254			if (strstr(buf, mrioc->name) &&
  1255				((pos_mini_dump + len + strlen(mini_end))
  1256				    < mrioc->drv_diag_buffer_sz)) {
  1257				sprintf((char *)mrioc->drv_diag_buffer
  1258				    + pos_mini_dump, "%s", buf);
  1259				pos_mini_dump += len;
  1260			}
  1261		}
  1262	
  1263		if ((pos_mini_dump + strlen(mini_end)
  1264				    < mrioc->drv_diag_buffer_sz)) {
  1265			sprintf((char *)mrioc->drv_diag_buffer + pos_mini_dump,
  1266				"%s\n", mini_end);
  1267			pos_mini_dump += strlen(mini_end);
  1268		}
  1269	
  1270	out:
  1271		drv_buff_header->logical_buffer_end =
  1272			pos_mini_dump - sizeof(struct mpi3_driver_buffer_header);
  1273	
  1274		ioc_info(mrioc, "driver diag buffer base_address(including 4K header) 0x%016llx, end_address 0x%016llx\n",
  1275		    (unsigned long long)mrioc->drv_diag_buffer_dma,
  1276		    (unsigned long long)mrioc->drv_diag_buffer_dma +
  1277		    mrioc->drv_diag_buffer_sz);
  1278		ioc_info(mrioc, "logical_buffer end_address 0x%016llx, logical_buffer_end 0x%08x\n",
  1279		    (unsigned long long)mrioc->drv_diag_buffer_dma +
  1280		    drv_buff_header->logical_buffer_end,
  1281		    drv_buff_header->logical_buffer_end);
  1282	
  1283		return pos_mini_dump;
  1284	}
  1285	

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux