Author's posts
Oct 23 2013
staging: drm/imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Author: Valentina Manea <valentina.manea.m@gmail.com> This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Valentina Manea Reviewed-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman — drivers/staging/imx-drm/imx-ldb.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff –git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 926f493..654bf03 100644 — a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -359,10 +359,8 @@ …
Oct 23 2013
staging: gdm724x: kzalloc should be used instead of kmalloc/memset
Author: Teodora Baluta <teobaluta@gmail.com> This patch fixes the following coccinelle warnings in driver gdm724x: drivers/staging/gdm724x/gdm_usb.c:127:9-16: WARNING: kzalloc should be used for t_sdu, instead of kmalloc/memset drivers/staging/gdm724x/gdm_usb.c:91:5-12: WARNING: kzalloc should be used for t, instead of kmalloc/memset Signed-off-by: Teodora Baluta Reviewed-by: Peter P Waskiewicz Jr Signed-off-by: Greg Kroah-Hartman — drivers/staging/gdm724x/gdm_usb.c | 6 ++—- 1 file changed, …
Oct 18 2013
ALSA: emu10k1: code refactoring
Author: Geyslan G. Bem <geyslan@gmail.com> Partially restructures _snd_emu10k1_audigy_init_efx() and _snd_emu10k1_init_efx() functions. Be noted that the cast is demanded to use ‘__user’. So, in these cases, avoid patches based on the coccinelle ‘drop_kmalloc_cast’ semantic patch. Signed-off-by: Geyslan G. Bem Signed-off-by: Takashi Iwai — sound/pci/emu10k1/emufx.c | 76 ++++++++++++++++++++++++++++——————- 1 file changed, 45 insertions(+), 31 deletions(-) diff …
Oct 14 2013
btrfs: simplify kmalloc+copy_from_user to memdup_user
Author: Geyslan G. Bem <geyslan@gmail.com> Use memdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives The semantic patch that makes this report is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Geyslan G. Bem Signed-off-by: Josef Bacik Signed-off-by: Chris Mason — fs/btrfs/ioctl.c | …
Oct 11 2013
wcn36xx: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 106 /c/kernel-tests/src/i386/drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 148 This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Generated by: coccinelle/api/simple_open.cocci CC: Eugene Krasnikov CC: John W. Linville Signed-off-by: …
Oct 10 2013
rcu: Fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> This commit fixes the following coccinelle warning: kernel/rcu/tree.c:712:9-10: WARNING: return of 0/1 in function ‘rcu_lockdep_current_cpu_online’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: Paul E. McKenney — kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), …
Oct 08 2013
ath10k: remove unneded semicolon from ath10k_core_fetch_firmware_api_n()
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/net/wireless/ath/ath10k/core.c:507:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Signed-off-by: Kalle Valo — drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index e016f51..c5561a9 100644 — a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -507,7 +507,7 @@ static int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name) …
Oct 02 2013
net: ipv4: Change variable type to bool
Author: Peter Senna Tschudin <peter.senna@gmail.com> The variable fully_acked is only assigned the values true and false. Change its type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ – T + bool b = …; … when any b = \(true\|false\) Signed-off-by: Peter Senna …
Oct 02 2013
net: myri10ge: Change variable type to bool
Author: Peter Senna Tschudin <peter.senna@gmail.com> There is the rc variable on both myri10ge_ss_lock_napi and myri10ge_ss_lock_poll functions. In both cases rc is only assigned the values true and false. Both functions already return bool. Change rc type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; …
Oct 02 2013
net: bnx2x: Change variable type to bool
Author: Peter Senna Tschudin <peter.senna@gmail.com> The variable rc is only assigned the values true and false. The function bnx2x_prev_is_path_marked already returns bool. Change rc type to bool. The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/): @exists@ type T; identifier b; @@ – T + bool b = …; … when any …