lkml.org 
[lkml]   [2016]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: x86-ksysfs: Use kmalloc_array() in create_setup_data_nodes()
From
Date


On 07/09/2016 13:17, SF Markus Elfring wrote:
>>> Are you looking for further possibilities to improve the involved
>>> source code search patterns?
>>
>> Why are you not answering the simple question that was asked?
>
> I find that I answered it to some degree.
>
> It can be that you do not really like the kind of answer that I chose
> a moment ago.
> But I guess that a more pleasing (and complete) answer can become
> another software development challenge as you might know already.
>
> Would the following script (for the semantic patch language)
> be useful enough for further development considerations?
>
> usage_of_kmalloc_array1-excerpt2.cocci:
> @replacement2@
> expression count, pointer, target;
> @@
> target =
> - kmalloc(sizeof(*pointer) * (count)
> + kmalloc_array(count, sizeof(*pointer)
> , ...);

Why don't you include the _exact_ script that you run? That's the only
possible correct answer.

Paolo

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.055 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site