Re: [PATCH] drivers: message: fusion: mptsas.c: Fix spaces during declaration

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

 



Hi Shubhankar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc8 next-20210423]
[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/Shubhankar-Kuranagatti/drivers-message-fusion-mptsas-c-Fix-spaces-during-declaration/20210425-004917
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8db5efb83fa99e81c3f8dee92a6589b251f117f3
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1196e3245d739d86f0445c20220cdfc5fca1eb5b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Shubhankar-Kuranagatti/drivers-message-fusion-mptsas-c-Fix-spaces-during-declaration/20210425-004917
        git checkout 1196e3245d739d86f0445c20220cdfc5fca1eb5b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc 

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

All errors (new ones prefixed by >>):

   drivers/message/fusion/mptsas.c: In function 'mptsas_add_device_component_starget':
   drivers/message/fusion/mptsas.c:783:14: warning: variable 'vtarget' set but not used [-Wunused-but-set-variable]
     783 |  VirtTarget *vtarget;
         |              ^~~~~~~
   drivers/message/fusion/mptsas.c: In function 'mptsas_reprobe_lun':
   drivers/message/fusion/mptsas.c:4233:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
    4233 |  int rc;
         |      ^~
   drivers/message/fusion/mptsas.c: In function 'mptsas_issue_tm':
   drivers/message/fusion/mptsas.c:4791:17: warning: variable 'timeleft' set but not used [-Wunused-but-set-variable]
    4791 |  unsigned long  timeleft;
         |                 ^~~~~~~~
   drivers/message/fusion/mptsas.c: In function 'mptsas_probe':
>> drivers/message/fusion/mptsas.c:5214:24: error: expected ';' before '}' token
    5214 |   goto out_mptsas_probe
         |                        ^
         |                        ;
    5215 |  }
         |  ~                      


vim +5214 drivers/message/fusion/mptsas.c

  5148	
  5149	static int
  5150	mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  5151	{
  5152		struct Scsi_Host	*sh;
  5153		MPT_SCSI_HOST		*hd;
  5154		MPT_ADAPTER 		*ioc;
  5155		unsigned long		 flags;
  5156		int			 ii;
  5157		int			 numSGE = 0;
  5158		int			 scale;
  5159		int			 ioc_cap;
  5160		int			error = 0;
  5161		int			r;
  5162	
  5163		r = mpt_attach(pdev, id);
  5164		if (r)
  5165			return r;
  5166	
  5167		ioc = pci_get_drvdata(pdev);
  5168		mptsas_fw_event_off(ioc);
  5169		ioc->DoneCtx = mptsasDoneCtx;
  5170		ioc->TaskCtx = mptsasTaskCtx;
  5171		ioc->InternalCtx = mptsasInternalCtx;
  5172		ioc->schedule_target_reset = &mptsas_schedule_target_reset;
  5173		ioc->schedule_dead_ioc_flush_running_cmds =
  5174					&mptscsih_flush_running_cmds;
  5175		/*  Added sanity check on readiness of the MPT adapter.
  5176		 */
  5177		if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {
  5178			printk(MYIOC_s_WARN_FMT
  5179			  "Skipping because it's not operational!\n",
  5180			  ioc->name);
  5181			error = -ENODEV;
  5182			goto out_mptsas_probe;
  5183		}
  5184	
  5185		if (!ioc->active) {
  5186			printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n",
  5187			  ioc->name);
  5188			error = -ENODEV;
  5189			goto out_mptsas_probe;
  5190		}
  5191	
  5192		/*  Sanity check - ensure at least 1 port is INITIATOR capable
  5193		 */
  5194		ioc_cap = 0;
  5195		for (ii = 0; ii < ioc->facts.NumberOfPorts; ii++) {
  5196			if (ioc->pfacts[ii].ProtocolFlags &
  5197					MPI_PORTFACTS_PROTOCOL_INITIATOR)
  5198				ioc_cap++;
  5199		}
  5200	
  5201		if (!ioc_cap) {
  5202			printk(MYIOC_s_WARN_FMT
  5203				"Skipping ioc=%p because SCSI Initiator mode "
  5204				"is NOT enabled!\n", ioc->name, ioc);
  5205			return 0;
  5206		}
  5207	
  5208		sh = scsi_host_alloc(&mptsas_driver_template, sizeof(MPT_SCSI_HOST));
  5209		if (!sh) {
  5210			printk(MYIOC_s_WARN_FMT
  5211				"Unable to register controller with SCSI subsystem\n",
  5212				ioc->name);
  5213			error = -1;
> 5214			goto out_mptsas_probe
  5215		}
  5216		spin_lock_irqsave(&ioc->FreeQlock, flags);
  5217	
  5218		/* Attach the SCSI Host to the IOC structure
  5219		 */
  5220		ioc->sh = sh;
  5221	
  5222		sh->io_port = 0;
  5223		sh->n_io_port = 0;
  5224		sh->irq = 0;
  5225	
  5226		/* set 16 byte cdb's */
  5227		sh->max_cmd_len = 16;
  5228		sh->can_queue = min_t(int, ioc->req_depth - 10, sh->can_queue);
  5229		sh->max_id = -1;
  5230		sh->max_lun = max_lun;
  5231		sh->transportt = mptsas_transport_template;
  5232	
  5233		/* Required entry.
  5234		 */
  5235		sh->unique_id = ioc->id;
  5236	
  5237		INIT_LIST_HEAD(&ioc->sas_topology);
  5238		mutex_init(&ioc->sas_topology_mutex);
  5239		mutex_init(&ioc->sas_discovery_mutex);
  5240		mutex_init(&ioc->sas_mgmt.mutex);
  5241		init_completion(&ioc->sas_mgmt.done);
  5242	
  5243		/* Verify that we won't exceed the maximum
  5244		 * number of chain buffers
  5245		 * We can optimize:  ZZ = req_sz/sizeof(SGE)
  5246		 * For 32bit SGE's:
  5247		 *  numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ
  5248		 *               + (req_sz - 64)/sizeof(SGE)
  5249		 * A slightly different algorithm is required for
  5250		 * 64bit SGEs.
  5251		 */
  5252		scale = ioc->req_sz/ioc->SGE_size;
  5253		if (ioc->sg_addr_size == sizeof(u64)) {
  5254			numSGE = (scale - 1) *
  5255			  (ioc->facts.MaxChainDepth-1) + scale +
  5256			  (ioc->req_sz - 60) / ioc->SGE_size;
  5257		} else {
  5258			numSGE = 1 + (scale - 1) *
  5259			  (ioc->facts.MaxChainDepth-1) + scale +
  5260			  (ioc->req_sz - 64) / ioc->SGE_size;
  5261		}
  5262	
  5263		if (numSGE < sh->sg_tablesize) {
  5264			/* Reset this value */
  5265			dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
  5266			  "Resetting sg_tablesize to %d from %d\n",
  5267			  ioc->name, numSGE, sh->sg_tablesize));
  5268			sh->sg_tablesize = numSGE;
  5269		}
  5270	
  5271		if (mpt_loadtime_max_sectors) {
  5272			if (mpt_loadtime_max_sectors < 64 ||
  5273				mpt_loadtime_max_sectors > 8192) {
  5274				printk(MYIOC_s_INFO_FMT "Invalid value passed for"
  5275					"mpt_loadtime_max_sectors %d."
  5276					"Range from 64 to 8192\n", ioc->name,
  5277					mpt_loadtime_max_sectors);
  5278			}
  5279			mpt_loadtime_max_sectors &=  0xFFFFFFFE;
  5280			dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
  5281				"Resetting max sector to %d from %d\n",
  5282			  ioc->name, mpt_loadtime_max_sectors, sh->max_sectors));
  5283			sh->max_sectors = mpt_loadtime_max_sectors;
  5284		}
  5285	
  5286		hd = shost_priv(sh);
  5287		hd->ioc = ioc;
  5288	
  5289		/* SCSI needs scsi_cmnd lookup table!
  5290		 * (with size equal to req_depth*PtrSz!)
  5291		 */
  5292		ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC);
  5293		if (!ioc->ScsiLookup) {
  5294			error = -ENOMEM;
  5295			spin_unlock_irqrestore(&ioc->FreeQlock, flags);
  5296			goto out_mptsas_probe;
  5297		}
  5298		spin_lock_init(&ioc->scsi_lookup_lock);
  5299	
  5300		dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ScsiLookup @ %p\n",
  5301			 ioc->name, ioc->ScsiLookup));
  5302	
  5303		ioc->sas_data.ptClear = mpt_pt_clear;
  5304	
  5305		hd->last_queue_full = 0;
  5306		INIT_LIST_HEAD(&hd->target_reset_list);
  5307		INIT_LIST_HEAD(&ioc->sas_device_info_list);
  5308		mutex_init(&ioc->sas_device_info_mutex);
  5309	
  5310		spin_unlock_irqrestore(&ioc->FreeQlock, flags);
  5311	
  5312		if (ioc->sas_data.ptClear == 1) {
  5313			mptbase_sas_persist_operation(
  5314			    ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT);
  5315		}
  5316	
  5317		error = scsi_add_host(sh, &ioc->pcidev->dev);
  5318		if (error) {
  5319			dprintk(ioc, printk(MYIOC_s_ERR_FMT
  5320			  "scsi_add_host failed\n", ioc->name));
  5321			goto out_mptsas_probe;
  5322		}
  5323	
  5324		/* older firmware doesn't support expander events */
  5325		if ((ioc->facts.HeaderVersion >> 8) < 0xE)
  5326			ioc->old_sas_discovery_protocal = 1;
  5327		mptsas_scan_sas_topology(ioc);
  5328		mptsas_fw_event_on(ioc);
  5329		return 0;
  5330	
  5331	 out_mptsas_probe:
  5332	
  5333		mptscsih_remove(pdev);
  5334		return error;
  5335	}
  5336	

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

Attachment: .config.gz
Description: application/gzip


[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