mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bradley Grove <bgrove@attotech.com>
To: Shawn Lin <shawn.lin@rock-chips.com>,
	Bradley Grove <linuxdrivers@attotech.com>,
	jejb@linux.vnet.ibm.com,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: not need to alloc zero buffer for local_atto_ioctl
Date: Thu, 25 Aug 2016 14:45:36 -0400	[thread overview]
Message-ID: <3abcfebd-8267-e0dd-6594-00ef2f18471a@attotech.com> (raw)
In-Reply-To: <1471746809-31218-1-git-send-email-shawn.lin@rock-chips.com>

Acked-by: Bradley Grove <bgrove@attotech.com>

On 08/20/2016 10:33 PM, Shawn Lin wrote:
> We don't need to use kzalloc as we will always memset the
> local_atto_ioctl later.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>
>  drivers/scsi/esas2r/esas2r_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c
> index 2aca4d1..5092c82 100644
> --- a/drivers/scsi/esas2r/esas2r_main.c
> +++ b/drivers/scsi/esas2r/esas2r_main.c
> @@ -194,7 +194,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
>  	int length = min(sizeof(struct atto_ioctl), count);
>
>  	if (!a->local_atto_ioctl) {
> -		a->local_atto_ioctl = kzalloc(sizeof(struct atto_ioctl),
> +		a->local_atto_ioctl = kmalloc(sizeof(struct atto_ioctl),
>  					      GFP_KERNEL);
>  		if (a->local_atto_ioctl == NULL) {
>  			esas2r_log(ESAS2R_LOG_WARN,
>



This electronic transmission and any attachments hereto are intended only for the use of the individual or entity to which it is addressed and may contain confidential information belonging to ATTO Technology, Inc. If you have reason to believe that you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this electronic transmission is strictly prohibited. If you have reason to believe that you have received this transmission in error, please notify ATTO immediately by return e-mail and delete and destroy this communication.   

  reply	other threads:[~2016-08-25 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21  2:33 Shawn Lin
2016-08-25 18:45 ` Bradley Grove [this message]
2016-08-26  2:29 ` Martin K. Petersen

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=3abcfebd-8267-e0dd-6594-00ef2f18471a@attotech.com \
    --to=bgrove@attotech.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxdrivers@attotech.com \
    --cc=martin.petersen@oracle.com \
    --cc=shawn.lin@rock-chips.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

Powered by JetHome