From: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
To: <davem@davemloft.net>, <andrew@lunn.ch>,
<michal.simek@xilinx.com>, <radhey.shyam.pandey@xilinx.com>
Cc: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH 2/5] net: emaclite: Balance braces in else statement
Date: Mon, 18 Jun 2018 05:08:20 -0600 [thread overview]
Message-ID: <1529320103-7711-3-git-send-email-radhey.shyam.pandey@xilinx.com> (raw)
In-Reply-To: <1529320103-7711-1-git-send-email-radhey.shyam.pandey@xilinx.com>
Remove else as it is not required with if doing a return.
Fixes below checkpatch warning.
WARNING: else is not generally useful after a break or return
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 0544134..8d84f58 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -569,13 +569,11 @@ static void xemaclite_tx_handler(struct net_device *dev)
(u8 *) lp->deferred_skb->data,
lp->deferred_skb->len) != 0)
return;
- else {
- dev->stats.tx_bytes += lp->deferred_skb->len;
- dev_kfree_skb_irq(lp->deferred_skb);
- lp->deferred_skb = NULL;
- netif_trans_update(dev); /* prevent tx timeout */
- netif_wake_queue(dev);
- }
+ dev->stats.tx_bytes += lp->deferred_skb->len;
+ dev_kfree_skb_irq(lp->deferred_skb);
+ lp->deferred_skb = NULL;
+ netif_trans_update(dev); /* prevent tx timeout */
+ netif_wake_queue(dev);
}
}
@@ -1052,13 +1050,13 @@ static bool get_bool(struct platform_device *ofdev, const char *s)
{
u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
- if (p) {
+ if (p)
return (bool)*p;
- } else {
- dev_warn(&ofdev->dev, "Parameter %s not found,"
+
+ dev_warn(&ofdev->dev, "Parameter %s not found,"
"defaulting to false\n", s);
- return false;
- }
+
+ return false;
}
static const struct net_device_ops xemaclite_netdev_ops;
--
2.7.4
next prev parent reply other threads:[~2018-06-18 11:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 11:08 [PATCH 0/5] Fixes coding style in xilinx_emaclite.c Radhey Shyam Pandey
2018-06-18 11:08 ` [PATCH 1/5] net: emaclite: Use __func__ instead of hardcoded name Radhey Shyam Pandey
2018-06-19 21:36 ` Andy Shevchenko
2018-06-19 22:37 ` Joe Perches
2018-06-25 13:47 ` Radhey Shyam Pandey
2018-06-18 11:08 ` Radhey Shyam Pandey [this message]
2018-06-18 11:08 ` [PATCH 3/5] net: emaclite: update kernel-doc comments Radhey Shyam Pandey
2018-06-18 11:08 ` [PATCH 4/5] net: emaclite: Fix block comments style Radhey Shyam Pandey
2018-06-18 11:08 ` [PATCH 5/5] net: emaclite: Remove unnecessary spaces Radhey Shyam Pandey
-- strict thread matches above, loose matches on Subject: below --
2018-06-18 11:50 [PATCH 0/5] Fixes coding style in xilinx_emaclite.c Radhey Shyam Pandey
2018-06-18 11:50 ` [PATCH 2/5] net: emaclite: Balance braces in else statement Radhey Shyam Pandey
2018-06-18 16:03 ` Joe Perches
2018-06-19 5:42 ` Radhey Shyam Pandey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529320103-7711-3-git-send-email-radhey.shyam.pandey@xilinx.com \
--to=radhey.shyam.pandey@xilinx.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).