[lkml]   [2019]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [v2] coccinelle: semantic code search for missing of_node_put
>> +if (x == NULL || ...) S
>> +... when != e = (T)x
>> + when != true x == NULL
> I wonder if this code exclusion specification is really required
> after a null pointer was checked before.

I would like to add another view for this implementation detail.

The when constraint can express a software desire which can be reasonable
to some degree. You would like to be sure that a null pointer will not occur
after a corresponding check succeeded.

* But I feel unsure about the circumstances under which the Coccinelle software
can determine this aspect actually.

* I find that it can eventually make sense only after the content of
the local variable (which is identified by “x”) was modified.
Thus I would find the exclusion of assignments more useful at this place.


 \ /
  Last update: 2019-06-29 09:42    [W:0.137 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site