Catégorie : Linux

Staging: gdm72xx: use !x instead of x == NULL

Author: Somya Anand <somyaanand214@gmail.com> Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done …

Lire la suite

staging: gdm724x: use !x instead of x == NULL

Author: Somya Anand <somyaanand214@gmail.com> Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done …

Lire la suite

staging: rtl8192u: remove return from end of void function

Author: Supriya Karanth <iskaranth@gmail.com> This patch removes the return statement at the end of a void function as it is not necessary. found by checkpatch.pl: WARNING: void function return statements are not generally useful changes made using coccinelle script: @@ @@ … when != if (…) return; when != if (…) { … return;} -return; …

Lire la suite

Staging: iio: Prefer using the BIT macro

Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro as it’s extensively used by other function in this driver. This was done with coccinelle: @@ int g; @@ -(1

staging: sm750fb: remove parantheses from return statements

Author: Supriya Karanth <iskaranth@gmail.com> found by checkpatch.pl :ERROR: return is not a function, parentheses are not required changes made using coccinelle script: @@ expression e,e1; @@ ( return (e / e1); | return -( e -) ; ) Signed-off-by: Supriya Karanth Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/sm750fb/ddk750_chip.c | 2 +- drivers/staging/sm750fb/ddk750_swi2c.c | 6 …

Lire la suite

Staging: lustre: Iterate list using list_for_each_entry

Author: Somya Anand <somyaanand214@gmail.com> Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. …

Lire la suite

Staging: gdm72xx: Iterate list using list_for_each_entry

Author: Somya Anand <somyaanand214@gmail.com> Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. …

Lire la suite

Staging: emxx_udc: Iterate list using list_for_each_entry

Author: Somya Anand <somyaanand214@gmail.com> Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. …

Lire la suite

Staging: ft1000: Iterate list using list_for_each_entry

Author: Somya Anand <somyaanand214@gmail.com> Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. …

Lire la suite

Staging: rtl8192u: Bool tests don’t need comparisons

Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes explicit true/false comparations to bool variables. Warning found by coccinelle: « WARNING: Comparison to bool » Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 5 ++— drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r819xU_firmware.c | 6 +++— drivers/staging/rtl8192u/r819xU_phy.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-)   diff –git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c …

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.