kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bhanu Prakash Gollapudi" <bprakash@broadcom.com>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	JBottomley@parallels.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/6] scsi: bnx2fc: remove useless calls to memset().
Date: Mon, 03 Dec 2012 22:16:59 +0000	[thread overview]
Message-ID: <50BD24DB.7090501@broadcom.com> (raw)
In-Reply-To: <1354416022-20189-4-git-send-email-tipecaml@gmail.com>

On 12/01/2012 06:40 PM, Cyril Roelandt wrote:
> These calls are followed by calls to memcpy() on the same memory area, so they
> can be safely removed.
>
> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
> ---
>   drivers/scsi/bnx2fc/bnx2fc_hwi.c |    4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
> index ef60afa..9be42b8 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
> @@ -759,8 +759,6 @@ static void bnx2fc_process_unsol_compl(struct bnx2fc_rport *tgt, u16 wqe)
>   		case FCOE_ERROR_CODE_DATA_SOFN_SEQ_ACTIVE_RESET:
>   			BNX2FC_TGT_DBG(tgt, "REC TOV popped for xid - 0x%x\n",
>   				   xid);
> -			memset(&io_req->err_entry, 0,
> -			       sizeof(struct fcoe_err_report_entry));
>   			memcpy(&io_req->err_entry, err_entry,
>   			       sizeof(struct fcoe_err_report_entry));
>   			if (!test_bit(BNX2FC_FLAG_SRR_SENT,
> @@ -847,8 +845,6 @@ ret_err_rqe:
>   			goto ret_warn_rqe;
>   		}
>   
> -		memset(&io_req->err_entry, 0,
> -		       sizeof(struct fcoe_err_report_entry));
>   		memcpy(&io_req->err_entry, err_entry,
>   		       sizeof(struct fcoe_err_report_entry));
>   
Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>



  reply	other threads:[~2012-12-03 22:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-02  2:40 [PATCH 0/6] Remove useless calls to memset() Cyril Roelandt
2012-12-02  2:40 ` [PATCH 1/6] bna: remove " Cyril Roelandt
2012-12-03  1:33   ` David Miller
2012-12-02  2:40 ` [PATCH 2/6] scsi: bfa: " Cyril Roelandt
2012-12-02  2:40 ` [PATCH 3/6] scsi: bnx2fc: " Cyril Roelandt
2012-12-03 22:16   ` Bhanu Prakash Gollapudi [this message]
2012-12-02  2:40 ` [PATCH 4/6] scsi: megaraid: remove a useless call " Cyril Roelandt
2012-12-03 22:27   ` adam radford
2012-12-02  2:40 ` [PATCH 5/6] rtl8712: remove useless calls " Cyril Roelandt
2012-12-03  3:09   ` Larry Finger
2012-12-02  2:40 ` [PATCH 6/6] vt6656: remove a useless call " Cyril Roelandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BD24DB.7090501@broadcom.com \
    --to=bprakash@broadcom.com \
    --cc=JBottomley@parallels.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tipecaml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).