[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <11d2a5c5-789b-c371-0173-575b14e4d980@embeddedor.com>
Date: Fri, 21 Feb 2020 14:57:10 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Kaaira Gupta <kgupta@...iitr.ac.in>,
Manish Chopra <manishc@...vell.com>,
GR-Linux-NIC-Dev@...vell.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
netdev@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: qlge: add braces on all arms of if-else
On 2/21/20 14:29, Kaaira Gupta wrote:
> fix all checkpatch.pl warnings of 'braces {} should be used on all arms
> of this statement' in the file qlge_ethtool.c by adding the braces.
>
> Signed-off-by: Kaaira Gupta <kgupta@...iitr.ac.in>
Acked-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Thanks for you patch.
--
Gustavo
> ---
> drivers/staging/qlge/qlge_ethtool.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/qlge/qlge_ethtool.c b/drivers/staging/qlge/qlge_ethtool.c
> index 790997aff995..592ca7edfc44 100644
> --- a/drivers/staging/qlge/qlge_ethtool.c
> +++ b/drivers/staging/qlge/qlge_ethtool.c
> @@ -259,8 +259,9 @@ static void ql_update_stats(struct ql_adapter *qdev)
> "Error reading status register 0x%.04x.\n",
> i);
> goto end;
> - } else
> + } else {
> *iter = data;
> + }
> iter++;
> }
>
> @@ -273,8 +274,9 @@ static void ql_update_stats(struct ql_adapter *qdev)
> "Error reading status register 0x%.04x.\n",
> i);
> goto end;
> - } else
> + } else {
> *iter = data;
> + }
> iter++;
> }
>
> @@ -290,8 +292,9 @@ static void ql_update_stats(struct ql_adapter *qdev)
> "Error reading status register 0x%.04x.\n",
> i);
> goto end;
> - } else
> + } else {
> *iter = data;
> + }
> iter++;
> }
>
> @@ -304,8 +307,9 @@ static void ql_update_stats(struct ql_adapter *qdev)
> "Error reading status register 0x%.04x.\n",
> i);
> goto end;
> - } else
> + } else {
> *iter = data;
> + }
> iter++;
> }
>
> @@ -316,8 +320,9 @@ static void ql_update_stats(struct ql_adapter *qdev)
> netif_err(qdev, drv, qdev->ndev,
> "Error reading status register 0x%.04x.\n", i);
> goto end;
> - } else
> + } else {
> *iter = data;
> + }
> end:
> ql_sem_unlock(qdev, qdev->xg_sem_mask);
> quit:
> @@ -488,8 +493,9 @@ static int ql_start_loopback(struct ql_adapter *qdev)
> if (netif_carrier_ok(qdev->ndev)) {
> set_bit(QL_LB_LINK_UP, &qdev->flags);
> netif_carrier_off(qdev->ndev);
> - } else
> + } else {
> clear_bit(QL_LB_LINK_UP, &qdev->flags);
> + }
> qdev->link_config |= CFG_LOOPBACK_PCS;
> return ql_mb_set_port_cfg(qdev);
> }
>
Powered by blists - more mailing lists