mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
coccinelle: put_device: Add a cast to an expression for an assignment
Extend a when constraint in a SmPL rule so that an additional cast is optionally excluded from source code searches for an expression in assignments. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.1902160934400.3212@hadrien/ Link: https://systeme.lip6.fr/pipermail/cocci/2019-February/005592.html Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
30a70e806d
commit
f58c17c202
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ if (id == NULL || ...) { ... return ...; }
|
|||
when != of_dev_put(id)
|
||||
when != if (id) { ... put_device(&id->dev) ... }
|
||||
when != e1 = (T)id
|
||||
when != e1 = &id->dev
|
||||
when != e1 = (T)(&id->dev)
|
||||
when != e1 = get_device(&id->dev)
|
||||
when != e1 = (T1)platform_get_drvdata(id)
|
||||
(
|
||||
|
|
Loading…
Reference in a new issue