Catégorie : Linux

KVM: x86: removing unused variable

Author: Saurabh Sengar <saurabh.truth@gmail.com> removing unused variables, found by coccinelle Signed-off-by: Saurabh Sengar Signed-off-by: Paolo Bonzini — arch/x86/kvm/x86.c | 16 +++++———– 1 file changed, 5 insertions(+), 11 deletions(-)   diff –git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9e9c226..57b5f79 100644 — a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3438,41 +3438,35 @@ static int kvm_vm_ioctl_set_irqchip(struct kvm *kvm, struct kvm_irqchip *chip)   static int …

Lire la suite

tty/vt/keyboard: use memdup_user to simplify code

Author: Saurabh Sengar <saurabh.truth@gmail.com> use memdup_user rather than duplicating implementation. found by coccinelle Signed-off-by: Saurabh Sengar Signed-off-by: Greg Kroah-Hartman — drivers/tty/vt/keyboard.c | 14 +++++——— 1 file changed, 5 insertions(+), 9 deletions(-)   diff –git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 6f0336f..f973bfc 100644 — a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -1706,16 +1706,12 @@ int vt_do_diacrit(unsigned int cmd, void __user *udp, int …

Lire la suite

backlight: pm8941-wled: Fix ptr_ret.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> drivers/video/backlight/pm8941-wled.c:404:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Acked-by: Bjorn Andersson Signed-off-by: Fengguang Wu Signed-off-by: Lee Jones — drivers/video/backlight/pm8941-wled.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-)   diff –git a/drivers/video/backlight/pm8941-wled.c b/drivers/video/backlight/pm8941-wled.c index c704c32..78bba87 100644 — a/drivers/video/backlight/pm8941-wled.c +++ b/drivers/video/backlight/pm8941-wled.c @@ …

Lire la suite

MIPS: pci-rt3883: drop unneeded of_node_get

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_child_of_node performs an of_node_get on each iteration, so no of_node_get is needed on breaking out of the loop when the device_node structure is saved in another variable. A simplified semantic match that finds this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root; local idexpression child; @@ for_each_child_of_node(root, child) { … …

Lire la suite

net: mv643xx_eth: add missing of_node_put

Author: Julia Lawall <julia.lawall@lip6.fr> for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Lire la suite

ath6kl: add missing of_node_put

Author: Julia Lawall <julia.lawall@lip6.fr> for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression e; local idexpression n; @@ for_each_compatible_node(n,…) { … when != of_node_put(n) when != e = n …

Lire la suite

[media] v4l: xilinx-tpg: add missing of_node_put

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Lire la suite

[media] v4l: xilinx-vipp: add missing of_node_put

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Lire la suite

net: phy: mdio: add missing of_node_put

Author: Julia Lawall <julia.lawall@lip6.fr> for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Lire la suite

netdev/phy: add missing of_node_put

Author: Julia Lawall <julia.lawall@lip6.fr> for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ local idexpression r.n; expression r,e; @@ for_each_available_child_of_node(r,n) { … ( of_node_put(n); | e = n | + …

Lire la suite