From: Markus Elfring <Markus.Elfring@web.de>
To: linux-tegra@vger.kernel.org, Coccinelle <cocci@systeme.lip6.fr>
Cc: JC Kuo <jckuo@nvidia.com>, Jonathan Hunter <jonathanh@nvidia.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Thierry Reding <treding@nvidia.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Kangjie Lu <kjlu@umn.edu>,
Navid Emamdoost <emamd001@umn.edu>,
Stephen McCamant <smccaman@umn.edu>,
Dan Carpenter <dan.carpenter@oracle.com>,
YueHaibing <yuehaibing@huawei.com>
Subject: Re: drivers/phy/tegra: Completion for exception handling in probe functions with SmPL?
Date: Wed, 30 Oct 2019 11:44:26 +0100 [thread overview]
Message-ID: <161bbb97-09d9-f128-bd25-ef9348534144@web.de> (raw)
In-Reply-To: <3e3f40db-2422-c64d-3825-35f8c2471eb7@web.de>
> Will any search pattern variations become more interesting for corresponding
> automatic software transformations?
I hoped to achieve something together with the semantic patch language
by the following transformation approach.
@adjustment@
expression object;
identifier exit;
@@
object = kzalloc(...)
...
if (...)
-{ kfree(object);
goto
- exit
+ release_memory
;
-}
... when any
device_unregister(...);
-exit
+release_memory
:
+kfree(object);
return ERR_PTR(...);
Do you find such a change suggestion reasonable (in principle)?
But I stumble on another unexpected test result.
elfring@Sonne:~/Projekte/Linux/next-patched> spatch drivers/phy/tegra/xusb-tegra186.c ~/Projekte/Coccinelle/janitor/complete_exception_handling_in_probe_functions1.cocci
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
HANDLING: drivers/phy/tegra/xusb-tegra186.c
How would you like to clarify why diff hunks were not generated
for functions like “tegra186_usb2_pad_probe” and “tegra186_usb3_pad_probe”
in such an use case?
https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/phy/tegra/xusb-tegra186.c#L445
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/phy/tegra/xusb-tegra186.c?id=bbf711682cd570697086e88388a2c718da918894#n445
Regards,
Markus
next prev parent reply other threads:[~2019-10-30 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 21:20 phy: tegra: xusb: Complete exception handling in five probe functions Markus Elfring
2019-10-29 9:40 ` phy: tegra: xusb: Complete exception handling in " Markus Elfring
2019-10-30 10:44 ` Markus Elfring [this message]
2019-10-30 20:50 ` drivers/phy/tegra: Completion for exception handling in probe functions with SmPL? Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=161bbb97-09d9-f128-bd25-ef9348534144@web.de \
--to=markus.elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=dan.carpenter@oracle.com \
--cc=emamd001@umn.edu \
--cc=jckuo@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kishon@ti.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=smccaman@umn.edu \
--cc=treding@nvidia.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).