Re: [PATCH v1 4/6] mpi3mr: WriteSame implementation

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

 



Hi Ranjan!

I am still unable to parse the indentation:

> @@ -4445,39 +4500,50 @@ static int mpi3mr_target_alloc(struct scsi_target *starget)
>  	starget->hostdata = scsi_tgt_priv_data;
>  
>  	spin_lock_irqsave(&mrioc->tgtdev_lock, flags);
> -
>  	if (starget->channel == mrioc->scsi_device_channel) {
>  		tgt_dev = __mpi3mr_get_tgtdev_by_perst_id(mrioc, starget->id);
> -		if (tgt_dev && !tgt_dev->is_hidden)
> -			update_stgt_priv_data = true;
> -		else
> +		if (tgt_dev && !tgt_dev->is_hidden) {

The block starts here                               ^

> +			scsi_tgt_priv_data->starget = starget;
> +			scsi_tgt_priv_data->dev_handle = tgt_dev->dev_handle;
> +			scsi_tgt_priv_data->perst_id = tgt_dev->perst_id;
> +			scsi_tgt_priv_data->dev_type = tgt_dev->dev_type;
> +			scsi_tgt_priv_data->tgt_dev = tgt_dev;
> +			tgt_dev->starget = starget;
> +			atomic_set(&scsi_tgt_priv_data->block_io, 0);
> +			retval = 0;
> +		if ((tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_PCIE) &&
> +		    ((tgt_dev->dev_spec.pcie_inf.dev_info &
> +		    MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_MASK) ==
> +		    MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_NVME_DEVICE) &&
> +		    ((tgt_dev->dev_spec.pcie_inf.dev_info &
> +		    MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_MASK) !=
> +		    MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_0))
> +			scsi_tgt_priv_data->dev_nvme_dif = 1;
> +		scsi_tgt_priv_data->io_throttle_enabled = tgt_dev->io_throttle_enabled;
> +		scsi_tgt_priv_data->wslen = tgt_dev->wslen;
> +		if (tgt_dev->dev_type == MPI3_DEVICE_DEVFORM_VD)
> +			scsi_tgt_priv_data->throttle_group = tgt_dev->dev_spec.vd_inf.tg;
> +		} else

and ends here.  ^

So either everything after "retval = 0" is incorrectly indented or it
belongs in a different scope.

-- 
Martin K. Petersen	Oracle Linux Engineering



[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