Messages in this thread | | | Subject | Re: [PATCH v3 12/16] treewide: Use array_size() for kmalloc()-family | From | SF Markus Elfring <> | Date | Sun, 1 Jul 2018 11:22:36 +0200 |
| |
>> * 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.
I suggest to consider additional software design options.
> Inheritance is only possible when a match of the previous rule has succeeded.
I agree with this information.
> If a rule never applies in a given file, the rules that inherit from it > won't apply either.
I would like to point the possibility out to specify a source code search which will find interesting function calls at least by an inital SmPL rule.
> Furthermore, what is inherited is the value, not the constraint.
This technical detail can be fine.
> If the original binding of alloc only ever matches kmalloc, > then the inherited references will only match kmalloc too.
Can the desired search pattern be extended in significant ways?
Regards, Markus
| |