Category: Coccinelle

lockd: constify nlmsvc_binding structure

Author: Julia Lawall <Julia.Lawall@lip6.fr> The nlmsvc_binding structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: J. Bruce Fields — fs/lockd/svc.c | 2 +- fs/nfsd/lockd.c | 2 +- include/linux/lockd/bind.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)   diff –git a/fs/lockd/svc.c b/fs/lockd/svc.c index b4006c72..154a107 …

Continue reading

staging: rdma: hfi1: diag: constify hfi1_filter_array structure

Author: Julia Lawall <Julia.Lawall@lip6.fr> The hfi1_filter_array structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Mike Marciniszyn Signed-off-by: Greg Kroah-Hartman — drivers/staging/rdma/hfi1/diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c index 0c88317..e41159f 100644 — a/drivers/staging/rdma/hfi1/diag.c +++ b/drivers/staging/rdma/hfi1/diag.c @@ …

Continue reading

PCI: shpchp: Constify hpc_ops structure

Author: Julia Lawall <Julia.Lawall@lip6.fr> The hpc_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas — drivers/pci/hotplug/shpchp.h | 4 ++– drivers/pci/hotplug/shpchp_hpc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)   diff –git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 821227f..4da8fc6 100644 — a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h …

Continue reading

fm10k: Move constants to the right of binary operators

Author: Bruce Allan <bruce.w.allan@intel.com> The semantic patch that makes this change is available in scripts/coccinelle/misc/compare_const_fl.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Bruce Allan Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher — drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 16 ++++++++——– drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 6 +++— 3 files changed, 12 insertions(+), 12 deletions(-)   diff …

Continue reading

blackfin-cpufreq: Change return type of cpu_set_cclk() to that of clk_set_rate()

Author: Markus Elfring <elfring@users.sourceforge.net> The return type “unsigned long” was used by the cpu_set_cclk() function while the type “int” is provided by the clk_set_rate() function. Let us make this usage consistent. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki — drivers/cpufreq/blackfin-cpufreq.c | 2 +- …

Continue reading

staging: lustre: Delete unnecessary goto statements in six functions

Author: Markus Elfring <elfring@users.sourceforge.net> Six goto statements referred to a source code position directly behind them. Thus omit such unnecessary jumps. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/namei.c | 1 – drivers/staging/lustre/lustre/mdc/mdc_request.c | 7 ——- 2 files changed, 8 deletions(-)   diff –git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c …

Continue reading

pinctrl: mediatek: 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 return from 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 n; expression e,e1; @@ for_each_child_of_node(e1,n) { … ( of_node_put(n); | e = n | return n; …

Continue reading

pinctrl: rockchip: 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 return from 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 n; expression e,e1; @@ for_each_child_of_node(e1,n) { … ( of_node_put(n); | e = n | return n; …

Continue reading

pinctrl: sh-pfc: 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 goto 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 n; expression e,e1; identifier l; @@ for_each_child_of_node(e1,n) { … ( of_node_put(n); | e = n …

Continue reading

pinctrl: sirf: 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 return from 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 n; expression e,e1; @@ for_each_child_of_node(e1,n) { … ( of_node_put(n); | e = n | return 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.