Category: Linux

GPU-DRM-OMAP: Delete unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The following functions test whether their argument is NULL and then return immediately. * backlight_device_unregister * drm_gem_object_unreference_unlocked 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: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/72ff4670-4f3d-c7ed-4f37-e49f2bbc7aba@users.sourceforge.net — drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 3 +– drivers/gpu/drm/omapdrm/omap_fb.c | 4 …

Continue reading

GPU-DRM-Exynos: Delete an unnecessary check before the function call “vunmap”

Author: Markus Elfring <elfring@users.sourceforge.net> The vunmap() 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/a5a79711-10a3-e304-a897-892ebdf2ff9f@users.sourceforge.net — drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c …

Continue reading

GPU-DRM-sun4i: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_fbdev_cma_hotplug_event() 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: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/cd959d92-f7d9-598c-421f-d3f40bedee10@users.sourceforge.net — drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …

Continue reading

drm/atomic: Delete an unnecessary check before drm_property_unreference_blob()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_property_unreference_blob() 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: Sean Paul Link: http://patchwork.freedesktop.org/patch/msgid/aa4cd508-38c3-78d7-a9f2-70e3b06a8fb5@users.sourceforge.net — drivers/gpu/drm/drm_atomic.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …

Continue reading

of: Delete an unnecessary check before the function call “of_node_put”

Author: Markus Elfring <elfring@users.sourceforge.net> The of_node_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: Rob Herring — drivers/of/base.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Continue reading

net/mlx5: Use PTR_ERR_OR_ZERO() to simplify the code

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Wei Yongjun Acked-by: Leon Romanovsky Signed-off-by: David S. Miller — drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 ++——– 1 file changed, 2 insertions(+), 8 deletions(-)   diff –git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 1a377b4..75bb8c8 100644 — a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1740,10 +1740,7 @@ static int init_ingress_acl_root_ns(struct …

Continue reading

watchdog: pic32-wdt: Remove .owner field for driver

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck — drivers/watchdog/pic32-wdt.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/watchdog/pic32-wdt.c b/drivers/watchdog/pic32-wdt.c index 2b7a2b2..18174fe 100644 — a/drivers/watchdog/pic32-wdt.c +++ b/drivers/watchdog/pic32-wdt.c @@ -251,7 …

Continue reading

watchdog: pic32-dmt: Remove .owner field for driver

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck — drivers/watchdog/pic32-dmt.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/watchdog/pic32-dmt.c b/drivers/watchdog/pic32-dmt.c index 5e8890e..c797305 100644 — a/drivers/watchdog/pic32-dmt.c +++ b/drivers/watchdog/pic32-dmt.c @@ -245,7 …

Continue reading

wan/fsl_ucc_hdlc: remove .owner field for driver

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller — drivers/net/wan/fsl_ucc_hdlc.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c index b3861bf..10ca497 100644 — a/drivers/net/wan/fsl_ucc_hdlc.c +++ b/drivers/net/wan/fsl_ucc_hdlc.c @@ -1168,7 +1168,6 @@ static struct platform_driver ucc_hdlc_driver …

Continue reading

drm/ttm: Delete an unnecessary check before the function call “ttm_tt_destroy”

Author: Markus Elfring <elfring@users.sourceforge.net> The ttm_tt_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: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/54338f58-830c-a8b4-4554-5d4459bcd321@users.sourceforge.net — drivers/gpu/drm/ttm/ttm_bo.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) …

Continue reading