Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts_pstor/rtsx_scsi.c | 2 +- 1 file changed, 1 insertion(+), …
Catégorie : Linux
Aug 13 2011
staging/easycap: Use memdup_user
Author: Thomas Meyer <thomas@m3y3r.de> Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives The semantic patch that makes this output is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/easycap/easycap_ioctl.c | 30 ++++++++++——————– 1 file changed, …
Aug 13 2011
staging: spectra: Use memdup_user
Author: Thomas Meyer <thomas@m3y3r.de> Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives The semantic patch that makes this output is available in scripts/coccinelle/api/memdup_user.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/spectra/ffsport.c | 15 ++++———– 1 file changed, …
Aug 12 2011
drivers/net/wireless/wl12xx: add missing kfree
Author: Julia Lawall <julia@diku.dk> In each case, the freed data should be freed in the error handling code as well. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(…); … …
Aug 12 2011
staging:iio:addac:adt7316 make interrupt mask sane.
Author: Jonathan Cameron <jic23@cam.ac.uk> Coccinelle found this one. I’m not certain what the intent is, but this fix makes no functional changes. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/addac/adt7316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 637316f..c828b6f 100644 — a/drivers/staging/iio/addac/adt7316.c +++ b/drivers/staging/iio/addac/adt7316.c @@ -203,7 +203,7 …
Aug 08 2011
staging: brcm80211: fix for ‘remove unnecessary braces’ checkpatch warning
Author: Henry Ptasinski <henryp@broadcom.com> Removed unnecessary braces in single-statement blocks. Used the tools ‘uncrustify’ and ‘coccinelle’ to accomplish this. Signed-off-by: Henry Ptasinski Reviewed-by: Arend van Spriel Reviewed-by: Roland Vossen Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman — drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 20 +- drivers/staging/brcm80211/brcmfmac/dhd_common.c | 45 +- drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 13 +- drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 64 +- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | …
Aug 08 2011
drivers/net/wireless/wl1251: add missing kfree
Author: Julia Lawall <julia@diku.dk> In each case, the kfree already at the end of the function is also needed in the error case. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x …
Aug 08 2011
arch/powerpc/sysdev/ehv_pic.c: add missing kfree
Author: Julia Lawall <julia@diku.dk> At this point, ehv_pic has been allocated but not stored anywhere, so it should be freed before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ …
Aug 08 2011
drivers/staging/bcm/nvm.c: add missing kfree
Author: Julia Lawall <julia@diku.dk> Buff is only used as a temporary buffer within the function, so it should be freed before leaving the function in an error case. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression …
Aug 08 2011
drivers/ata/sata_dwc_460ex.c: add missing kfree
Author: Julia Lawall <julia@diku.dk> Currently, error handling code in this function calls the function sata_dwc_port_stop, but this function has essentially no effect if hsdevp has not been stored in ap, which is the case throughout this function. The only effect is to print a debugging message including ap->print_id. The code is rewritten to not call …