Skip to content

Commit

Permalink
IB/qib: add missing braces in do_qib_user_sdma_queue_create()
Browse files Browse the repository at this point in the history
Commit c804f07 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/[email protected]
Cc: Mike Marciniszyn <[email protected]>
Cc: [email protected]
Cc: Julia Lawall <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Yann Droneaud <[email protected]>
Tested-by: Mike Marciniszyn <[email protected]>
Acked-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
ydroneaud authored and rolandd committed Mar 17, 2014
1 parent 7d7632a commit 37a9676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/qib/qib_file_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,14 +1578,15 @@ static int do_qib_user_sdma_queue_create(struct file *fp)
struct qib_ctxtdata *rcd = fd->rcd;
struct qib_devdata *dd = rcd->dd;

if (dd->flags & QIB_HAS_SEND_DMA)
if (dd->flags & QIB_HAS_SEND_DMA) {

fd->pq = qib_user_sdma_queue_create(&dd->pcidev->dev,
dd->unit,
rcd->ctxt,
fd->subctxt);
if (!fd->pq)
return -ENOMEM;
}

return 0;
}
Expand Down

0 comments on commit 37a9676

Please sign in to comment.