Linus Torvalds writes: (Summary)
Why can't you just have a separate set of coccinelle scripts that do
the simple and clean cases?
the simple and clean cases?
So *before* doing any array_size() conversions, just do So *before* doing any array_size() conversions, just do kzalloc(a*b, ...) -> kcalloc(a, b, ...)
kmalloc(a*b,..) -> Only after doing the ones that don't have the nice obvious helpers, do the remaining ones with array_size(), ie
the remaining ones with array_size(), ie
*alloc(a*b, ..) ->
the simple and clean cases?
So *before* doing any array_size() conversions, just do So *before* doing any array_size() conversions, just do kzalloc(a*b, ...) -> kcalloc(a, b, ...)
kmalloc(a*b,..) -> Only after doing the ones that don't have the nice obvious helpers, do the remaining ones with array_size(), ie
the remaining ones with array_size(), ie
*alloc(a*b, ..) ->