Catégorie : Linux

net: cassini: 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: David S. Miller — drivers/net/ethernet/sun/cassini.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index …

Lire la suite

clk: qcom: fix simple_return.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com> drivers/clk/qcom/clk-pll.c:74:1-4: WARNING: end returns can be simpified Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu Signed-off-by: Stephen Boyd — drivers/clk/qcom/clk-pll.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/clk/qcom/clk-pll.c b/drivers/clk/qcom/clk-pll.c index b4325f6..245d506 100644 — a/drivers/clk/qcom/clk-pll.c +++ …

Lire la suite

ARM: at91: remove legacy IRQ driver and related code

Author: Nicolas Ferre <nicolas.ferre@atmel.com> Remove irc.c and associated header file. The related code was idendified by the CONFIG_OLD_IRQ_AT91 option that was removed previously. It has been spotted by following coccinelle semantic match: @rule1@ expression E; statement S; @@ ( – if (IS_ENABLED(CONFIG_OLD_IRQ_AT91)) S | – if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && E) S ) Cc: Julia Lawall Signed-off-by: …

Lire la suite

usb: chipidea: fix platform_no_drv_owner.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/usb/chipidea/ci_hdrc_usb2.c:108: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 Cc: Antoine Tenart Cc: Peter Chen Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/usb/chipidea/ci_hdrc_usb2.c | 1 – 1 file changed, 1 deletion(-)   diff …

Lire la suite

usb: gadget: fix platform_no_drv_owner.cocci warnings

Author: Julia Lawall <julia.lawall@lip6.fr> Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Julia Lawall Signed-off-by: Felipe Balbi — drivers/usb/gadget/udc/bdc/bdc_core.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index c6dfef8..5c8f4ef 100644 — a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -521,7 +521,6 @@ static int bdc_remove(struct platform_device *pdev) …

Lire la suite

ext4: Remove an unnecessary check for NULL 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. Signed-off-by: Markus Elfring Signed-off-by: Theodore Ts’o — fs/ext4/mballoc.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Lire la suite

clk: clk-s2mps11: fix semicolon.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/clk/clk-s2mps11.c:181:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Tushar Behera Signed-off-by: Fengguang Wu Signed-off-by: Michael Turquette — drivers/clk/clk-s2mps11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index b7797fb..f16ab25e 100644 — a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -195,7 +195,7 @@ static int s2mps11_clk_probe(struct platform_device …

Lire la suite

net: Hyper-V: 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: Haiyang Zhang Signed-off-by: David S. Miller — drivers/net/hyperv/netvsc.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git …

Lire la suite

staging: ozwpan: Deletion of unnecessary checks before the function call « oz_free_urb_link »

Author: Markus Elfring <elfring@users.sourceforge.net> The oz_free_urb_link() 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: Greg Kroah-Hartman — drivers/staging/ozwpan/ozhcd.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff …

Lire la suite

drm/msm: Deletion of unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions framebuffer_release() and vunmap() perform 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 Reviewed-by: Thierry Reding Signed-off-by: Rob Clark — drivers/gpu/drm/msm/msm_fbdev.c | 3 +– drivers/gpu/drm/msm/msm_gem.c | 3 +– 2 files changed, 2 insertions(+), …

Lire la suite