Re: [PATCH 1/2] target/spc: Simplify INQUIRY EVPD=0x80

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

 



On Fri, 2014-06-06 at 17:15 +0200, Christophe Vu-Brugier wrote:
> Signed-off-by: Christophe Vu-Brugier <cvubrugier@xxxxxxxx>
> ---
>  drivers/target/target_core_spc.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
> index 8653666..17b5b7e 100644
> --- a/drivers/target/target_core_spc.c
> +++ b/drivers/target/target_core_spc.c
> @@ -129,15 +129,10 @@ static sense_reason_t
>  spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
>  {
>  	struct se_device *dev = cmd->se_dev;
> -	u16 len = 0;
> +	u16 len;
>  
>  	if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) {
> -		u32 unit_serial_len;
> -
> -		unit_serial_len = strlen(dev->t10_wwn.unit_serial);
> -		unit_serial_len++; /* For NULL Terminator */
> -
> -		len += sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
> +		len = sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
>  		len++; /* Extra Byte for NULL Terminator */
>  		buf[3] = len;
>  	}

Applied to target-pending/for-next.

Thanks Christophe!

--nab

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




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux