From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: perf/x86: Use kmalloc_array() in merge_attr()
Date: Wed, 14 Sep 2016 18:40:32 +0200 [thread overview]
Message-ID: <a465479e-59eb-b047-dbe6-f3686b4ecd31@users.sourceforge.net> (raw)
In-Reply-To: <20160905075149.GQ10153@twins.programming.kicks-ass.net>
>> * A multiplication for the size determination of a memory allocation
>> indicated that an array data structure should be processed.
>> Thus use the corresponding function "kmalloc_array".
>>
>> This issue was detected by using the Coccinelle software.
>>
>> * Replace the specification of a data structure by a pointer dereference
>> to make the corresponding size determination a bit safer according to
>> the Linux coding style convention.
>
> Why!?
How do you think about an information like the following from
the well-known script "checkpatch.pl"?
WARNING: Prefer kmalloc_array over kmalloc with multiply
Would you like to suggest any more constraints for this kind of
software refactoring?
Regards,
Markus
next prev parent reply other threads:[~2016-09-14 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 9:00 [PATCH] " SF Markus Elfring
2016-09-05 7:51 ` Peter Zijlstra
2016-09-14 16:40 ` SF Markus Elfring [this message]
2016-09-14 17:04 ` Peter Zijlstra
2016-09-14 17:38 ` SF Markus Elfring
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=a465479e-59eb-b047-dbe6-f3686b4ecd31@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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