Author's posts
Nov 17 2014
ALSA: ice17xx: Deletion of unnecessary checks before the function call “snd_ac97_resume”
Author: Markus Elfring <elfring@users.sourceforge.net> The snd_ac97_resume() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai — sound/pci/ice1712/ice1712.c | 3 +– sound/pci/ice1712/ice1724.c | 3 +– 2 files changed, 2 insertions(+), …
Nov 17 2014
ALSA: hda: Deletion of unnecessary checks before two function calls
Author: Markus Elfring <elfring@users.sourceforge.net> The functions kfree() and release_firmware() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai — sound/pci/hda/hda_codec.c | 3 +– sound/pci/hda/hda_intel.c | 3 +– 2 files changed, …
Nov 17 2014
Thermal: fix platform_no_drv_owner.cocci warnings
Author: Wu Fengguang <fengguang.wu@intel.com> drivers/thermal/int340x_thermal/int3403_thermal.c:468:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Acked-by: Zhang Rui Signed-off-by: Zhang Rui — drivers/thermal/int340x_thermal/int3403_thermal.c | 1 – 1 file changed, 1 deletion(-) diff –git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c index …
Nov 17 2014
jbd: Deletion of an unnecessary check before the function call “iput”
Author: Markus Elfring <elfring@users.sourceforge.net> The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jan Kara — fs/jbd/journal.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 16 2014
tracing: Deletion of an unnecessary check before iput()
Author: Markus Elfring <elfring@users.sourceforge.net> The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/5468F875.7080907@users.sourceforge.net Signed-off-by: Markus Elfring Signed-off-by: Steven Rostedt — kernel/trace/trace_uprobe.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …
Nov 16 2014
PM / hibernate: Deletion of an unnecessary check before the function call “vfree”
Author: Markus Elfring <elfring@users.sourceforge.net> The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Rafael J. Wysocki — kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/kernel/power/swap.c b/kernel/power/swap.c index …
Nov 13 2014
phy: Use PTR_ERR_OR_ZERO to fix warning raised by coccinelle
Author: Gregory CLEMENT <gregory.clement@free-electrons.com> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Signed-off-by: Gregory CLEMENT Acked-by: Jason Cooper Signed-off-by: Kishon Vijay Abraham I — drivers/phy/phy-berlin-sata.c | 5 +—- drivers/phy/phy-hix5hd2-sata.c | 5 +—- drivers/phy/phy-miphy365x.c | 5 +—- drivers/phy/phy-stih41x-usb.c | 5 +—- 4 files changed, 4 insertions(+), 16 deletions(-) diff –git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c index …
Nov 11 2014
PCI: Delete unnecessary NULL pointer checks
Author: Markus Elfring <elfring@users.sourceforge.net> The functions pci_dev_put(), pci_pme_wakeup_bus(), and put_device() return immediately if their argument is NULL. Thus the test before the call is not needed. Remove these unnecessary tests. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bjorn Helgaas — drivers/pci/pci-acpi.c | 3 +– drivers/pci/probe.c | 3 +– drivers/pci/search.c …
Nov 09 2014
staging: lustre: osc: remove final uses of the GOTO macro
Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ – GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ – GOTO(lbl,rc); + rc; + goto lbl; // In one case (OES_INV), consecutive gotos were factorized and a break was …
Nov 06 2014
PCI: Simplify if-return sequences
Author: Quentin Lambert <lambert.quentin@gmail.com> Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Quentin Lambert Signed-off-by: Bjorn Helgaas — drivers/pci/hotplug/ibmphp_res.c | 5 +—- drivers/pci/pci.c | 6 +—– 2 files changed, 2 insertions(+), 9 deletions(-) diff –git a/drivers/pci/hotplug/ibmphp_res.c b/drivers/pci/hotplug/ibmphp_res.c index 219ba80..f279060 100644 — a/drivers/pci/hotplug/ibmphp_res.c +++ b/drivers/pci/hotplug/ibmphp_res.c @@ -376,10 …