lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHtARFE0y=ug1icuPdUcA0BVqnn6VfknAaVs=V16J-hcbZemGQ@mail.gmail.com>
Date:	Mon, 3 Dec 2012 14:27:07 -0800
From:	adam radford <aradford@...il.com>
To:	Cyril Roelandt <tipecaml@...il.com>
Cc:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	megaraidlinux@....com, JBottomley@...allels.com,
	linux-scsi@...r.kernel.org
Subject: Re: [PATCH 4/6] scsi: megaraid: remove a useless call to memset().

On Sat, Dec 1, 2012 at 6:40 PM, Cyril Roelandt <tipecaml@...il.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@...il.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@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ