Articles de cet auteur
Mar 09 2016
leds: wm831x-status: Use devm_led_classdev_register
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata from probe function and the remove function, wm831x_status_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ …
Mar 09 2016
leds: lp8788: Use devm_led_classdev_register
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, lp8788_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ …
Mar 09 2016
leds: 88pm860x: Use devm_led_classdev_register
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. Also, remove platform_set_drvdata in probe function and the remove function, pm860x_led_remove as it is now has nothing to do. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ …
Mar 08 2016
staging: rtl8192e: Prefer using macro DIV_ROUND_UP
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> The macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( – ((e1) + e2 – 1) / (e2) + DIV_ROUND_UP(e1,e2) | – ((e1) + (e2 – 1)) / (e2) + …
Mar 08 2016
staging: rtl8723au: hal: Use macro DIV_ROUND_UP
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> The macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) /(d)). It clarifies the divisor calculations. This was done using the coccinelle script: @@ expression e1; expression e2; @@ ( – ((e1) + e2 – 1) / (e2) + DIV_ROUND_UP(e1,e2) | – ((e1) + (e2 – 1)) / (e2) + …
Mar 07 2016
staging: netlogic: Replace pr_* with netdev_*
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Replace generic pr_info and pr_err with netdev_info and netdev_err respectively for net devices. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ expression e; identifier f,i; position p; @@ f(…,struct net_device *i,…) { … ( – pr_debug@p (e) + netdev_dbg(i, e) | – pr_err@p …
Mar 07 2016
leds: lm3533: Use devm_led_classdev_register
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Switch to resource-managed function devm_led_classdev_register instead of led_classdev_register and remove unneeded led_classdev_unregister. To be compatible with this change, remove an unnecessary label by replacing it with direct return statement. The Coccinelle semantic patch used to make this change is as follows: // @platform@ identifier p, probefn, removefn; @@ struct platform_driver …
Mar 06 2016
Staging: most: Use list_first_entry instead of list_entry
Author: Bhumika Goyal <bhumirks@gmail.com> This patch replaces list_entry with list_first_entry as it makes the code more clear. Done using coccinelle: @@ expression e; @@ ( – list_entry(e->next, + list_first_entry(e, …) | – list_entry(e->prev, + list_last_entry(e, …) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman — drivers/staging/most/hdm-dim2/dim2_hdm.c | 6 +++— 1 file changed, 3 insertions(+), 3 deletions(-) …
Mar 06 2016
Staging: lustre: Use list_{next/prev}_entry instead of list_entry
Author: Bhumika Goyal <bhumirks@gmail.com> This patch replace list_entry with list_{next/prev}_entry as it makes the code more clear to read. Done using coccinelle: @@ expression e1; identifier e3; type t; @@ ( – list_entry(e1->e3.next,t,e3) + list_next_entry(e1,e3) | – list_entry(e1->e3.prev,t,e3) + list_prev_entry(e1,e3) ) Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 3 +– drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 7 …
Mar 06 2016
Staging: lustre: lnet: Use list_first_entry_or_null
Author: Bhumika Goyal <bhumirks@gmail.com> This patch replaces list_empty and list_entry with list_first_entry_or_null. Done using coccinelle: @@ expression e1,e2; statement S; @@ – if(!list_empty(…)){ e2= – list_entry(e1.next, + list_first_entry_or_null(&e1, …); + if(e2){ … } Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lnet/selftest/conrpc.c | 7 +++—- drivers/staging/lustre/lnet/selftest/framework.c | 7 +++—- 2 files changed, 6 insertions(+), 8 deletions(-) …