Catégorie : Linux

staging: rtl8712: rtl871x_ioctl_linux: Clean up tests if NULL returned on failure

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(…); … – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++– 1 file changed, …

Lire la suite

staging: rtl8712: rtl871x_cmd: Clean up tests if NULL returned on failure

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(…); … – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_cmd.c | 80 +++++++++++++++++—————— 1 file changed, …

Lire la suite

staging: rtl8712: rtl871x_mlme: Clean up tests if NULL returned on failure

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(…); … – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++– 1 file changed, …

Lire la suite

staging: rtl8712: usb_ops_linux: Clean up tests if NULL returned on failure

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(…); … – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/usb_ops_linux.c | 2 +- 1 file changed, …

Lire la suite

staging: rtl8712: os_intfs: Change form of NULL comparisons

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ – e == NULL + !e Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8712/os_intfs.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index ab19112..57211f7 …

Lire la suite

scripts: coccinelle: remove check to move constants to right

Author: Wolfram Sang <wsa@the-dreams.de> The header mentions this check depends on personal taste. I agree. Running coccicheck on patches before I apply them, this SmPL produced enough false positives for me that I’d rather see it removed. Signed-off-by: Wolfram Sang Acked-by: Julia Lawall Signed-off-by: Michal Marek — scripts/coccinelle/misc/compare_const_fl.cocci | 171 ————————- 1 file changed, 171 …

Lire la suite

staging: lustre: lnet: Replace sg++ with sg = sg_next(sg)

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> With scatterlist chaining, simply incrementing the array does not work. sg_next macro was thus introduced to follow the chain links when necessary. So replace sg++ with sg_next. This change was made with the help of the following Coccinelle semantic patch: // @@ struct scatterlist *sg; @@ -sg++ +sg = sg_next(sg) …

Lire la suite

misc: mic: Remove return statements from void functions

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Return statements at the end of void functions are useless. The Coccinelle semantic patch used to make this change is as follows: // @@ identifier f; expression e; @@ void f(…) { } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/misc/mic/host/mic_boot.c | 6 +++— 1 file changed, 3 …

Lire la suite

crypto: n2 – Remove return statement from void function

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Return statement at the end of a void function is useless. The Coccinelle semantic patch used to make this change is as follows: // @@ identifier f; expression e; @@ void f(…) { } // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Herbert Xu — drivers/crypto/n2_core.c | 2 +- 1 file changed, …

Lire la suite

Staging: rtl8723au: rtl8723a_rf6052: Remove unnecessary semicolon.

Author: Sandhya Bankar <bankarsandhya512@gmail.com> Remove unnecessary semicolon. Coccinelle sementic patch as follows: @r_case@ position p; @@ switch (…) { case …: …;@p } @r_default@ position p; @@ switch (…) { default: …;@p } @r1@ statement S; position p1; position p != {r_case.p, r_default.p}; identifier label; @@ ( label:; | S@p1;@p ) Signed-off-by: Sandhya Bankar Signed-off-by: …

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.