lkml.org 
[lkml]   [2021]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cocci script to convert linux-kernel allocs with BITS_TO_LONGS to bitmap_alloc
From
Date
On Tue, 2021-07-13 at 23:33 +0200, Julia Lawall wrote:
> > > On Fri, 9 Jul 2021, Joe Perches wrote:
> > > > Here is a cocci script to convert various types of bitmap allocations
> > > > that use BITS_TO_LONGS to the more typical bitmap_alloc functions.
>
> I see that there is also a bitmap_free. Maybe the rule should be
> introducing that as well?

Yes, but as far as I know, it's difficult for coccinelle to convert
the kfree() calls of any previous bitmap_alloc to bitmap_free as
most frequently the kfree() call is in a separate function.

Please do it if you know how, you're probably the best in the world
at coccinelle. I don't know how...

cheers, Joe

\
 
 \ /
  Last update: 2021-07-14 01:10    [W:0.164 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site