From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RESEND] Fix misuse of calloc() in linux/compat.h header
Date: Sat, 09 Jun 2012 01:43:43 +0200 [thread overview]
Message-ID: <20120608234343.3874A2000F5@gemini.denx.de> (raw)
In-Reply-To: <1339176514-13137-1-git-send-email-marex@denx.de>
Dear Marek Vasut,
In message <1339176514-13137-1-git-send-email-marex@denx.de> you wrote:
>
> -#define kzalloc(size, flags) calloc(size, 1)
> +#define kzalloc(size, flags) calloc(1, size)
Does this make any practical difference?
I mean, are you aware of any problem that gets fixed by this patch, or
even any kind of performance degradation?
"common/dlmalloc.src" says:
calloc(size_t unit, size_t quantity);
Returns a pointer to quantity * unit bytes, with all locations
set to zero.
Multiplication being commutative, I see zero effect in this patch?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Business is like a wheelbarrow. Nothing ever happens until you start
pushing.
next prev parent reply other threads:[~2012-06-08 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 17:28 [U-Boot] [PATCH RESEND] Fix misuse of calloc() in linux/compat.h header Marek Vasut
2012-06-08 23:43 ` Wolfgang Denk [this message]
2012-06-08 23:48 ` Marek Vasut
2012-06-08 23:58 ` Wolfgang Denk
2012-06-09 0:04 ` Marek Vasut
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=20120608234343.3874A2000F5@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/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