lkml.org 
[lkml]   [2018]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family
> > // 2-factor product with sizeof(variable)
> > @@
> > identifier alloc =~ "kmalloc|kzalloc|kvmalloc|kvzalloc";
>
> * This regular expression could be optimised to the specification “kv?[mz]alloc”.
> Extensions will be useful for further function names.
>
> * The repetition of such a constraint in subsequent SmPL rules could be avoided
> if inheritance will be used for this metavariable.

This is quite incorrect. Inheritance is only possible when a match of the
previous rule has succeeded. If a rule never applies in a given file, the
rules that inherit from it won't apply either. Furthermore, what is
inherited is the value, not the constraint. If the original binding of
alloc only ever matches kmalloc, then the inherited references will only
match kmalloc too.

julia
\
 
 \ /
  Last update: 2018-07-01 11:04    [W:0.106 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site