linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Naresh Kumar Inna <naresh@chelsio.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [patch] [SCSI] csiostor: remove unneeded memset()
Date: Thu, 29 Nov 2012 11:45:00 +0530	[thread overview]
Message-ID: <50B6FD64.2080504@chelsio.com> (raw)
In-Reply-To: <20121127173330.GD1059@elgon.mountain>

On 11/27/2012 11:03 PM, Dan Carpenter wrote:
> No need to memset() this when we just copy over it on the next line.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
> index 551959e..8b54976 100644
> --- a/drivers/scsi/csiostor/csio_lnode.c
> +++ b/drivers/scsi/csiostor/csio_lnode.c
> @@ -245,7 +245,6 @@ csio_append_attrib(uint8_t **ptr, uint16_t type, uint8_t *val, uint16_t len)
>  	len += 4;		/* includes attribute type and length */
>  	len = (len + 3) & ~3;	/* should be multiple of 4 bytes */
>  	ae->len = htons(len);
> -	memset(ae->value, 0, len - 4);
>  	memcpy(ae->value, val, len);
>  	*ptr += len;
>  }
> 

Acked-by: Naresh Kumar Inna <naresh@chelsio.com>

Thanks,
Naresh.

      reply	other threads:[~2012-11-29  6:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 17:33 [patch] [SCSI] csiostor: remove unneeded memset() Dan Carpenter
2012-11-29  6:15 ` Naresh Kumar Inna [this message]

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=50B6FD64.2080504@chelsio.com \
    --to=naresh@chelsio.com \
    --cc=JBottomley@parallels.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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).