Catégorie : Linux

VSOCK: fix returnvar.cocci warnings

Author: Julia Lawall <julia.lawall@lip6.fr> Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: Asias He Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller — drivers/vhost/vsock.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 65b1cf8..64bcb10 100644 — a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c …

Lire la suite

drm/amd/powerplay: fix boolreturn.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomctrl.c:475:10-11: WARNING: return of 0/1 in function ‘atomctrl_lookup_gpio_pin’ 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: yanyang1 Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher — drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git …

Lire la suite

usb: ehci: ohci: fix bool assignments

Author: Geyslan G. Bem <geyslan@gmail.com> When assigning bool use true instead of 1. If declaring it as static and it’s false there’s no need to initialize it, since static variables are zeroed by default. Caught by coccinelle. Signed-off-by: Geyslan G. Bem Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/ohci-hcd.c | 4 ++– drivers/usb/host/u132-hcd.c | …

Lire la suite

usb: use BUG_ON() instead of BUG()

Author: Geyslan G. Bem <geyslan@gmail.com> Replace BUG() with BUG_ON(). Caught by coccinelle. Signed-off-by: Geyslan G. Bem Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/oxu210hp-hcd.c | 8 +++—– 1 file changed, 3 insertions(+), 5 deletions(-)   diff –git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 1f139d8..bc74aca 100644 — a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c @@ -394,8 +394,7 @@ static void ehci_quiesce(struct oxu_hcd *oxu) u32 temp;   …

Lire la suite

usb: whci: fhci: remove comparison to bool

Author: Geyslan G. Bem <geyslan@gmail.com> Get rid of bool explicit comparisons. Caught by Coccinelle. Signed-off-by: Geyslan G. Bem Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/fhci-tds.c | 2 +- drivers/usb/host/whci/qset.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index 1498061..f82ad5d 100644 — a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c @@ -85,7 +85,7 @@ static struct …

Lire la suite

iio: exynos-adc: fix irqf_oneshot.cocci warnings

Author: Valentin Rothberg <valentinrothberg@gmail.com> Since commit 1c6c69525b40 (« genirq: Reject bogus threaded irq requests ») threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Signed-off-by: Fengguang Wu Signed-off-by: Valentin Rothberg Signed-off-by: Olof Johansson — drivers/iio/adc/exynos_adc.c | 2 +- …

Lire la suite

ASoC: da7218: fix boolreturn.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> sound/soc/codecs/da7218.c:3214:9-10: WARNING: return of 0/1 in function ‘da7218_volatile_register’ 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 Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown — sound/soc/codecs/da7218.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c …

Lire la suite

IB/core: constify mmu_notifier_ops structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> This mmu_notifier_ops structure is never modified, so declare it as const, like the other mmu_notifier_ops structures. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Haggai Eran Signed-off-by: Doug Ledford — drivers/infiniband/core/umem_odp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 40becdb..e69bf26 100644 …

Lire la suite

iommu/amd: Constify mmu_notifier_ops structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> This mmu_notifier_ops structure is never modified, so declare it as const, like the other mmu_notifier_ops structures. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Joerg Roedel — drivers/iommu/amd_iommu_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c index 6a28b74..c865737 100644 — a/drivers/iommu/amd_iommu_v2.c +++ …

Lire la suite

xen/gntdev: constify mmu_notifier_ops structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> This mmu_notifier_ops structure is never modified, so declare it as const, like the other mmu_notifier_ops structures. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David Vrabel — drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 1be5dd0..cbd3836 100644 — a/drivers/xen/gntdev.c +++ …

Lire la suite