[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v5] coccinelle: semantic code search for missing put_device()
> In a function, for a local variable returned by calling
> of_find_device_by_node(),

I suggest to reconsider this information once more.

1. Will an other wording be more appropriate for the storage of
a function return value?

2. Can the restriction “local” be omitted?

3. Will any macros be involved eventually?

> c, for the rest of the situation, the current function should release the
> reference by calling put_device,

Can it happen that on other function will perform the desired reference release?

> this code search will report the
> corresponding error message.

A code search can report an error with a specific confidence.

> v5->v4:

Such version information would be sufficient also without arrows, wouldn't it?

> - add a SPDX identifierfix

Would you like to fix a typo at the end?

> +@script:python depends on report@
> +p1 << search.p1;
> +p2 << search.p2;
> +@@
> +
>[0], "ERROR: missing put_device; "
> + + "call of_find_device_by_node on line "
> + + p1[0].line
> + + ", but without a corresponding object release "
> + + "within this function.")

I find your interpretation of my reminder for the preferred avoidance
of split string literals interesting somehow.

Can the following source code variant be more appropriate?[0],
+ "WARNING: missing put_device - of_find_device_by_node() call on line "
+ + p1[0].line
+ + ", but without a corresponding object release within this function.")

Will any more advanced error diagnostics be eventually developed?


 \ /
  Last update: 2019-02-15 10:11    [W:1.079 / U:3.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site