mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@free-electrons.com>
To: Joe Perches <joe@perches.com>
Cc: hare@suse.de, JBottomley@parallels.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	julia.lawall@lip6.fr
Subject: Re: [PATCH] aic7xxx: replace kmalloc/memset by kzalloc
Date: Thu, 16 Oct 2014 21:30:43 +0200	[thread overview]
Message-ID: <54401CE3.8000307@free-electrons.com> (raw)
In-Reply-To: <1413487720.15773.1.camel@perches.com>

Hi Joe,

On 10/16/2014 09:28 PM, Joe Perches wrote:
> On Thu, 2014-10-16 at 21:14 +0200, Michael Opdenacker wrote:
>
>  
>  	/* Allocate SCB resources */
> -	scb_data->scbarray = kmalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC, GFP_ATOMIC);
> +	scb_data->scbarray = kzalloc(sizeof(struct scb) * AHC_SCB_MAX_ALLOC,
> +				GFP_ATOMIC);
>  	if (scb_data->scbarray == NULL)
>  		return (ENOMEM);
> -	memset(scb_data->scbarray, 0, sizeof(struct scb) * AHC_SCB_MAX_ALLOC);
>  
>  	/* Determine the number of hardware SCBs and initialize them */
>  
> Probably better as kcalloc.

Hey, well spotted! Thanks for your review. I will post a new version soon.

Cheers,

Michael.

>


-- 
Michael Opdenacker, CEO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
+33 484 258 098


  reply	other threads:[~2014-10-16 19:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 19:14 Michael Opdenacker
2014-10-16 19:28 ` Joe Perches
2014-10-16 19:30   ` Michael Opdenacker [this message]
2014-10-16 20:05     ` Elliott, Robert (Server Storage)
2015-03-22 16:31       ` [PATCH] [RESEND] " Michael Opdenacker
2015-03-23  6:59         ` Hannes Reinecke
2015-03-24 20:46           ` Michael Opdenacker
2015-03-24 20:57             ` Joe Perches
2015-03-24 23:16               ` Elliott, Robert (Server Storage)
2015-03-27  0:38                 ` Michael Opdenacker
2015-03-27  0:51                   ` Michael Opdenacker
2015-03-27 19:48                   ` kcalloc/kmalloc_array could BUILD_BUG_ON for too-big constant arguments (was Re: [PATCH] [RESEND] aic7xxx: replace kmalloc/memset by kzalloc) Jeff Epler

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=54401CE3.8000307@free-electrons.com \
    --to=michael.opdenacker@free-electrons.com \
    --cc=JBottomley@parallels.com \
    --cc=hare@suse.de \
    --cc=joe@perches.com \
    --cc=julia.lawall@lip6.fr \
    --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

Powered by JetHome