Articles de cet auteur
Mar 12 2014
rcu: Protect uses of ->jiffies_stall with ACCESS_ONCE()
Author: Himangi Saraogi <himangi774@gmail.com> Some of the accesses to the rcu_state structure’s ->jiffies_stall field are unprotected. This patch protects them with ACCESS_ONCE(). The following coccinelle script was used to acheive this: /* coccinelle script to protect uses of ->jiffies_stall with ACCESS_ONCE() */ @@ identifier a; @@ ( ACCESS_ONCE(a->jiffies_stall) | – a->jiffies_stall + ACCESS_ONCE(a->jiffies_stall) ) Signed-off-by: …
Mar 12 2014
staging: cxt1e1: Removed assignments from if statements.
Author: Chi Pham <fempsci@gmail.com> Assignments removed from if statements. Fixed checkpatch warning such as indentation and negative error returns in adjacent code. Coccinelle was used for this patch. The following script found the match: @simple@ expression E1, E2; statement S1, S2; @@ + E1 = E2; if ( – (E1 = E2) + E1 ) …
Mar 12 2014
staging: unisys: visorutil: Use kzalloc instead of kmalloc with memset
Author: Iulia Manda <iulia.manda21@gmail.com> Fix coccinelle warnings of better allocation by using kzalloc. In these cases, kzalloc is preferred, as kmalloc may fail if it does not find contiguous memory. Signed-off-by: Iulia Manda Acked-by: Luis R. Rodriguez Signed-off-by: Peter P Waskiewicz Jr — drivers/staging/unisys/visorutil/procobjecttree.c | 24 ++++++++————— 1 file changed, 8 insertions(+), 16 deletions(-) …
Mar 11 2014
staging: android: ion: Use ERR_CAST instead of ERR_PTR
Author: Iulia Manda <iulia.manda21@gmail.com> Fix the following coccinelle warnings in ion.c: drivers/staging/android/ion/ion.c:511:9-16: WARNING: ERR_CAST can be used with buffer drivers/staging/android/ion/ion.c:218:9-16: WARNING: ERR_CAST can be used with table drivers/staging/android/ion/ion.c:1150:9-16: WARNING: ERR_CAST can be used with dmabuf Signed-off-by: Iulia Manda Acked-by: Paul E. McKenney Signed-off-by: Peter P Waskiewicz Jr — drivers/staging/android/ion/ion.c | 6 +++— 1 file changed, …
Mar 11 2014
IB/qib: fixup indentation in qib_ib_rcv()
Author: Yann Droneaud <ydroneaud@opteya.com> Commit af061a644a0e4d4778 add some code in qib_ib_rcv() which trigger a warning from coccicheck (coccinelle/spatch): $ make C=2 CHECK=scripts/coccicheck drivers/infiniband/hw/qib/ CHECK drivers/infiniband/hw/qib/qib_verbs.c drivers/infiniband/hw/qib/qib_verbs.c:679:5-32: code aligned with following code on line 681 CC [M] drivers/infiniband/hw/qib/qib_verbs.o In fact, according to similar code in qib_kreceive(), qib_ib_rcv() code is correct but improperly indented. This patch fix …
Mar 11 2014
IB/qib: add missing braces in do_qib_user_sdma_queue_create()
Author: Yann Droneaud <ydroneaud@opteya.com> Commit c804f07248895ff9c moved qib_assign_ctxt() to do_qib_user_sdma_queue_create() but dropped the braces around the statements. This was spotted by coccicheck (coccinelle/spatch): $ make C=2 CHECK=scripts/coccicheck drivers/infiniband/hw/qib/ CHECK drivers/infiniband/hw/qib/qib_file_ops.c drivers/infiniband/hw/qib/qib_file_ops.c:1583:2-23: code aligned with following code on line 1587 This patch adds braces back. Link: http://marc.info/?i=cover.1394485254.git.ydroneaud@opteya.com Cc: Mike Marciniszyn Cc: infinipath@intel.com Cc: Julia Lawall Cc: …
Mar 11 2014
IB/nes: Return an error on ib_copy_from_udata() failure instead of NULL
Author: Yann Droneaud <ydroneaud@opteya.com> In case of error while accessing to userspace memory, function nes_create_qp() returns NULL instead of an error code wrapped through ERR_PTR(). But NULL is not expected by ib_uverbs_create_qp(), as it check for error with IS_ERR(). As page 0 is likely not mapped, it is going to trigger an Oops when the …
Mar 11 2014
IB/mthca: Return an error on ib_copy_to_udata() failure
Author: Yann Droneaud <ydroneaud@opteya.com> In case of error when writing to userspace, the function mthca_create_cq() does not set an error code before following its error path. This patch sets the error code to -EFAULT when ib_copy_to_udata() fails. This was caught when using spatch (aka. coccinelle) to rewrite call to ib_copy_{from,to}_udata(). Link: https://www.gitorious.org/opteya/coccib/source/75ebf2c1033c64c1d81df13e4ae44ee99c989eba:ib_copy_udata.cocci Link: http://marc.info/?i=cover.1394485254.git.ydroneaud@opteya.com Cc: …
Mar 11 2014
IB/ehca: Returns an error on ib_copy_to_udata() failure
Author: Yann Droneaud <ydroneaud@opteya.com> In case of error when writing to userspace, function ehca_create_cq() does not set an error code before following its error path. This patch sets the error code to -EFAULT when ib_copy_to_udata() fails. This was caught when using spatch (aka. coccinelle) to rewrite call to ib_copy_{from,to}_udata(). Link: https://www.gitorious.org/opteya/coccib/source/75ebf2c1033c64c1d81df13e4ae44ee99c989eba:ib_copy_udata.cocci Link: http://marc.info/?i=cover.1394485254.git.ydroneaud@opteya.com Cc: Signed-off-by: …
Mar 10 2014
staging: rtl8192u: Removed assignments from if statements.
Author: Chi Pham <fempsci@gmail.com> Removes assignments from if statements and simplifies unnecessary 0/NULL-checking. The following coccinelle script found the match: @@ expression E0, E1, E2; statement S0; @@ – if (E0 == (E1 = E2)) + E1 = E2; + if (E1 == E0) S0 Signed-off-by: Chi Pham Acked-by: Paul E. McKenney Signed-off-by: Peter P …