Re: [PATCH 2/4] mpt3sas: Fix for Crusader to achieve product targets with SAS devices.

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

 



On Thu, 2017-01-19 at 21:19 +0530, Chaitra P B wrote:
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index 5ffbfb1..b3f9f7a 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -1096,6 +1096,27 @@ _scsih_scsi_lookup_get_clear(struct MPT3SAS_ADAPTER *ioc, u16 smid)
>  }
>  
>  /**
> + * _scsih_scsi_lookup_get_clear_without_lock - returns scmd entry without
> + *						holding any lock.
> + * @ioc: per adapter object
> + * @smid: system request message index
> + *
> + * Returns the smid stored scmd pointer.
> + * Then will derefrence the stored scmd pointer.
> + */
> +static inline struct scsi_cmnd *
> +_scsih_scsi_lookup_get_clear_without_lock(struct MPT3SAS_ADAPTER *ioc,
> +		u16 smid)
> +{
> +	struct scsi_cmnd *scmd;
> +
> +	scmd = ioc->scsi_lookup[smid - 1].scmd;
> +	ioc->scsi_lookup[smid - 1].scmd = NULL;
> +
> +	return scmd;
> +}

Please make the following changes in the above code:
* Use swap() instead of open-coding it.
* Call _scsih_scsi_lookup_get_clear_without_lock() from
  _scsih_scsi_lookup_get_clear() to avoid code duplication.
* Fix the spelling of "dereference".

Thanks,

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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