From: Sebastian Fuentes Date: Mon, 31 Aug 2020 01:48:59 +0000 (-0700) Subject: staging: qlge: qlge_mpi: Fix several CHECKs involving braces X-Git-Tag: v5.10.7~1420^2~149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=608a911bcd3ddc20579191ebfca498e6dfbedf74;p=platform%2Fkernel%2Flinux-rpi.git staging: qlge: qlge_mpi: Fix several CHECKs involving braces CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:121: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:243: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:350: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:352: CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:360: CHECK: Blank lines aren't necessary after an open brace '{' FILE: drivers/staging/qlge/qlge_mpi.c:408: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:997: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:1001: Signed-off-by: Sebastian Fuentes Link: https://lore.kernel.org/r/20200831014859.GA29362@ubuntu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/qlge/qlge_mpi.c b/drivers/staging/qlge/qlge_mpi.c index e85c6ab538df..143a886080c5 100644 --- a/drivers/staging/qlge/qlge_mpi.c +++ b/drivers/staging/qlge/qlge_mpi.c @@ -117,7 +117,6 @@ int ql_own_firmware(struct ql_adapter *qdev) return 1; return 0; - } static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp) @@ -240,12 +239,12 @@ static int ql_idc_cmplt_aen(struct ql_adapter *qdev) netif_err(qdev, drv, qdev->ndev, "Could not read MPI, resetting RISC!\n"); ql_queue_fw_error(qdev); - } else + } else { /* Wake up the sleeping mpi_idc_work thread that is * waiting for this event. */ complete(&qdev->ide_completion); - + } return status; } @@ -347,16 +346,15 @@ static int ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp) mbcp->out_count = 6; status = ql_get_mb_sts(qdev, mbcp); - if (status) + if (status) { netif_err(qdev, drv, qdev->ndev, "Lost AEN broken!\n"); - else { + } else { int i; netif_err(qdev, drv, qdev->ndev, "Lost AEN detected.\n"); for (i = 0; i < mbcp->out_count; i++) netif_err(qdev, drv, qdev->ndev, "mbox_out[%d] = 0x%.08x.\n", i, mbcp->mbox_out[i]); - } return status; @@ -405,7 +403,6 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp) } switch (mbcp->mbox_out[0]) { - /* This case is only active when we arrive here * as a result of issuing a mailbox command to * the firmware. @@ -998,9 +995,9 @@ int ql_mb_get_led_cfg(struct ql_adapter *qdev) netif_err(qdev, drv, qdev->ndev, "Failed to get LED Configuration.\n"); status = -EIO; - } else + } else { qdev->led_config = mbcp->mbox_out[1]; - + } return status; }