Catégorie : Linux

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

Lire la suite

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

Lire la suite

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

Lire la suite

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

Lire la suite

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

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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

Lire la suite

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 …

Lire la suite

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

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.