lkml.org 
[lkml]   [2012]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/6] scsi: megaraid: remove a useless call to memset().
From
On Sat, Dec 1, 2012 at 6:40 PM, Cyril Roelandt <tipecaml@gmail.com> wrote:
> This call is followed by a call to memcpy() on the same memory area, so it can
> be safely removed.
>
> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index 74030af..71cc3eb 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -1028,8 +1028,6 @@ map_cmd_status(struct megasas_cmd_fusion *cmd, u8 status, u8 ext_status)
>
> cmd->scmd->result = (DID_OK << 16) | ext_status;
> if (ext_status == SAM_STAT_CHECK_CONDITION) {
> - memset(cmd->scmd->sense_buffer, 0,
> - SCSI_SENSE_BUFFERSIZE);
> memcpy(cmd->scmd->sense_buffer, cmd->sense,
> SCSI_SENSE_BUFFERSIZE);
> cmd->scmd->result |= DRIVER_SENSE << 24;
> --

Acked-by: Adam Radford <aradford@gmail.com>


\
 
 \ /
  Last update: 2012-12-04 00:01    [W:0.112 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site