Author: Fengguang Wu <fengguang.wu@intel.com> drivers/hwmon/nct6775.c:3866:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck Signed-off-by: Fengguang Wu Signed-off-by: Guenter Roeck — drivers/hwmon/nct6775.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index fdbd632..7a1b6a7 100644 — a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -3862,10 …
Catégorie : Linux
Sep 17 2013
drm/msm: Odd PTR_ERR usage
Author: Thomas Meyer <thomas@m3y3r.de> The variable priv->kms is not initialized yet. Found by « scripts/coccinelle/tests/odd_ptr_err.cocci ». PTR_ERR should access the value just tested by IS_ERR. Signed-off-by: Thomas Meyer — drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 008d772..fe03f9c 100644 — a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -199,7 +199,7 @@ static …
Sep 15 2013
staging/lustre: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c:217:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: coccinelle/misc/semicolon.cocci CC: Peng Tao Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index e90c8fb..26f3f41 100644 — a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -207,7 +207,7 @@ static void enc_pools_release_free_pages(long npages) p_idx++; …
Sep 12 2013
rtc: simplify devm_request_mem_region/devm_ioremap
Author: Julia Lawall <Julia.Lawall@lip6.fr> Convert the composition of devm_request_mem_region and devm_ioremap to a single call to devm_ioremap_resource. The associated call to platform_get_resource is also simplified and moved next to the new call to devm_ioremap_resource. This was done using a combination of the semantic patches devm_ioremap_resource.cocci and devm_request_and_ioremap.cocci, found in the scripts/coccinelle/api directory. In rtc-lpc32xx.c and …
Sep 11 2013
Btrfs: add the missing mutex unlock in write_all_supers()
Author: Stefan Behrens <sbehrens@giantdisaster.de> The BUG() was replaced by btrfs_error() and return -EIO with the patch « get rid of one BUG() in write_all_supers() », but the missing mutex_unlock() was overlooked. The 0-DAY kernel build service from Intel reported the missing unlock which was found by the coccinelle tool: fs/btrfs/disk-io.c:3422:2-8: preceding lock on line 3374 Signed-off-by: Stefan …
Sep 04 2013
[media] dm1105: remove unneeded not-null test
Author: Alexandru Juncu <alexj@rosedu.org> i2c_adap is a field of a struct and will always be allocated so its address will never be null. Suggested by coccinelle, manually verified. Signed-off-by: Alexandru Juncu Signed-off-by: Mauro Carvalho Chehab — drivers/media/pci/dm1105/dm1105.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index e985e3b..e60ac35 100644 …
Sep 02 2013
drivers:net: delete premature free_irq
Author: Julia Lawall <Julia.Lawall@lip6.fr> Free_irq is not needed if there has been no request_irq. Free_irq is removed from both the probe and remove functions. The correct request_irq and free_irq are found in the open and close functions. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression …
Sep 02 2013
spi: designware: delete premature free_irq
Author: Julia Lawall <Julia.Lawall@lip6.fr> Free_irq is not needed if there has been no request_irq. Free_irq is removed from both the probe and remove functions. The correct request_irq and free_irq appear to be in the add_host and remove_host functions in spi-dw.c. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) …
Aug 29 2013
[SCSI] esas2r: coccinelle – Replace memcpy with struct assignment
Author: Bradley Grove <bgrove@attotech.com> Reported-by: Fengguang Wu Signed-off-by: Bradley Grove Signed-off-by: James Bottomley — drivers/scsi/esas2r/esas2r_flash.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) diff –git a/drivers/scsi/esas2r/esas2r_flash.c b/drivers/scsi/esas2r/esas2r_flash.c index 45e353f..2ec3c23 100644 — a/drivers/scsi/esas2r/esas2r_flash.c +++ b/drivers/scsi/esas2r/esas2r_flash.c @@ -1360,7 +1360,7 @@ void esas2r_nvram_set_defaults(struct esas2r_adapter *a) u32 time = jiffies_to_msecs(jiffies); esas2r_lock_clear_flags(&a->flags, AF_NVR_VALID); – memcpy(n, &default_sas_nvram, …
Aug 26 2013
PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci Error-handling code was manually removed from the associated calls to platform_get_resource. Adjust the comment at the third platform_get_resource_byname to make clear why ioremap is not done at this point. Signed-off-by: Julia Lawall Acked-by: Thierry Reding Tested-by: Thierry Reding …