Category: 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 …

Continue reading

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 …

Continue reading

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 @@ …

Continue reading

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) { … …

Continue reading

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 = …

Continue reading

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 …

Continue reading

[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 = …

Continue reading

[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 = …

Continue reading

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 = …

Continue reading

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 | + …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.