Author's posts
Jun 29 2015
Matching variable declarations if they have the same type as a variable named “foo”
In this example we try to find variables of a specific type. It is similar to the first example but instead of using a fixed type we want to consider all types that were used to declare any variable named “foo”. You will learn how to inherit metavariable bindings from one rule to another and …
Jun 29 2015
net-Liquidio: Delete unnecessary checks 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: David S. Miller — drivers/net/ethernet/cavium/liquidio/octeon_device.c | 11 +++——– drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 4 +— drivers/net/ethernet/cavium/liquidio/request_manager.c | 3 +– 3 files changed, 5 insertions(+), …
Jun 28 2015
PCI: iproc: Delete unnecessary checks before phy calls
Author: Markus Elfring <elfring@users.sourceforge.net> The functions phy_exit() and phy_power_off() test whether their argument is NULL and then return immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. [bhelgaas: also phy_init() and phy_power_on(), as Ray Jui suggested] [bhelgaas: also remove tests in iproc_pcie_remove()] Signed-off-by: Markus Elfring …
Jun 28 2015
ALSA: hda: Delete an unnecessary check before the function call “snd_info_free_entry”
Author: Markus Elfring <elfring@users.sourceforge.net> The snd_info_free_entry() 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/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Jun 28 2015
drm/msm/dsi: Delete an unnecessary check before the function call “dsi_destroy”
Author: Markus Elfring <elfring@users.sourceforge.net> The dsi_destroy() 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: Rob Clark — drivers/gpu/drm/msm/dsi/dsi.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff …
Jun 27 2015
ipmi: Delete an unnecessary check before the function call “cleanup_one_si”
Author: Markus Elfring <elfring@users.sourceforge.net> The cleanup_one_si() 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: Corey Minyard — drivers/char/ipmi/ipmi_si_intf.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff …
Jun 26 2015
tc1100-wmi: Delete an unnecessary check before the function call “kfree”
Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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: Darren Hart — drivers/platform/x86/tc1100-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Jun 26 2015
crypto: qat – 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 calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Herbert Xu — drivers/crypto/qat/qat_common/adf_accel_engine.c | 5 +—- drivers/crypto/qat/qat_common/adf_transport.c | 2 +- 2 files changed, …
Jun 26 2015
eCryptfs: Delete a check before the function call “key_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The key_put() function tests whether its argument is NULL and then returns immediately. Thus the test around this call might not be needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Tyler Hicks — fs/ecryptfs/crypto.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …
Jun 26 2015
f2fs crypto: delete an unnecessary check before the function call “key_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The key_put() 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: Jaegeuk Kim — fs/f2fs/crypto_key.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …