Category: Linux

staging: rtl8712: Drop unneeded cast on netdev_priv

Author: Julia Lawall <Julia.Lawall@lip6.fr> The result of netdev_priv is already implicitly cast to the type of the left side of the assignment. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; T *x; @@ x = – (T *) netdev_priv(…) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/os_intfs.c …

Continue reading

Staging: rtl8712: Remove duplicated argument to |

Author: Cristina Opriceana <cristina.opriceana@gmail.com> Delete duplicated argument to | for the state argument in the _clr_fwstate_() function call as it is redundant. Detected with coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_ioctl_set.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c index bd1d1b7..22262b3 100644 — a/drivers/staging/rtl8712/rtl871x_ioctl_set.c +++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c …

Continue reading

Staging: rtl8712: Use memdup_user() instead of copy_from_user()

Author: Cristina Opriceana <cristina.opriceana@gmail.com> Use memdup_user() to avoid its duplicated implementation and simplify code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC, which is valid because copy_from_user() might sleep and it’s useless to make the allocation atomic. Found with coccinelle. Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 10 +++——- 1 file changed, 3 insertions(+), 7 …

Continue reading

drm/i915: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Michel Thierry Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter — drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +——- 1 file changed, 1 insertion(+), 7 …

Continue reading

drm/i915/skl: fix semicolon.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/gpu/drm/i915/intel_pm.c:2913:4-5: Unneeded semicolon Removes unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Tvrtko Ursulin Signed-off-by: Fengguang Wu Signed-off-by: Daniel Vetter — drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 753a3af..fa4ccb3 100644 — a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2910,7 +2910,7 @@ static bool skl_compute_plane_wm(const struct …

Continue reading

Staging: iio: use the BIT macro in adc

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch replaces bit shifting on: 0,1,2, and 3 with the BIT(x) macro. Issue addressed by checkpatcg.pl. This was done with the help of Coccinelle: @r1@ identifier x; constant int g; @@ ( 0

cxgb4: fix boolreturn.cocci warnings

Author: Wu Fengguang <fengguang.wu@intel.com> drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c:49:9-10: WARNING: return of 0/1 in function ‘cxgb_fcoe_sof_eof_supported’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Varun Prakash Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller — drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-)   diff …

Continue reading

staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros

Author: Joe Perches <joe@perches.com> Macros with hidden flow control are bad form as the code path taken can be unexpected for the reader. Expand these in-place and remove the macros. Done with coccinelle script: @@ expression chip; expression arg1; expression arg2; expression arg3; @@ – RTSX_WRITE_REG(chip, arg1, arg2, arg3); + retval = rtsx_write_register(chip, arg1, arg2, …

Continue reading

staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros

Author: Joe Perches <joe@perches.com> Remove these flow hiding macros. Miscellanea: o Add a macro and function to replace a large inline o Simplify #includes o Add trace.c and update Makefile o Remove static inline filename function and use kbasename instead This reduces object size quite a lot: ~350KB (x86-64 allyesconfig) $ size drivers/staging/rts5208/built-in.o* text data …

Continue reading

usb: chipidea: usbmisc_imx: fix returnvar.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/usb/chipidea/usbmisc_imx.c:277:5-8: Unneeded variable: “ret”. Return “0” on line 297 Removes unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Cc: Julia Lawall Signed-off-by: Peter Chen Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/usb/chipidea/usbmisc_imx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.