From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 11/13] enc28j60: Amend comments by fixing typos, adding periods, etc
Date: Mon, 18 Mar 2019 18:11:00 +0200 [thread overview]
Message-ID: <20190318161102.27711-11-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20190318161102.27711-1-andriy.shevchenko@linux.intel.com>
Amend comments in the code:
- adding periods to the multi-line comments
- fixing typos
- capitalize first word in the sentences
- etc
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/net/ethernet/microchip/enc28j60.c | 31 ++++++++++++-----------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
index 6cb0fe5d6371..c27bf8a7c32a 100644
--- a/drivers/net/ethernet/microchip/enc28j60.c
+++ b/drivers/net/ethernet/microchip/enc28j60.c
@@ -40,7 +40,8 @@
(NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN | NETIF_MSG_LINK)
/* Buffer size required for the largest SPI transfer (i.e., reading a
- * frame). */
+ * frame).
+ */
#define SPI_TRANSFER_BUF_LEN (4 + MAX_FRAMELEN)
#define TX_TIMEOUT (4 * HZ)
@@ -82,7 +83,7 @@ static struct {
/*
* SPI read buffer
- * wait for the SPI transfer and copy received data to destination
+ * Wait for the SPI transfer and copy received data to destination.
*/
static int
spi_read_buf(struct enc28j60_net *priv, int len, u8 *data)
@@ -191,7 +192,7 @@ static void enc28j60_soft_reset(struct enc28j60_net *priv)
{
spi_write_op(priv, ENC28J60_SOFT_RESET, 0, ENC28J60_SOFT_RESET);
/* Errata workaround #1, CLKRDY check is unreliable,
- * delay at least 1 mS instead */
+ * delay at least 1 ms instead */
udelay(2000);
}
@@ -203,7 +204,7 @@ static void enc28j60_set_bank(struct enc28j60_net *priv, u8 addr)
u8 b = (addr & BANK_MASK) >> 5;
/* These registers (EIE, EIR, ESTAT, ECON2, ECON1)
- * are present in all banks, no need to switch bank
+ * are present in all banks, no need to switch bank.
*/
if (addr >= EIE && addr <= ECON1)
return;
@@ -364,7 +365,7 @@ static void locked_regw_write(struct enc28j60_net *priv,
/*
* Buffer memory read
- * Select the starting address and execute a SPI buffer read
+ * Select the starting address and execute a SPI buffer read.
*/
static void enc28j60_mem_read(struct enc28j60_net *priv,
u16 addr, int len, u8 *data)
@@ -452,7 +453,7 @@ static int wait_phy_ready(struct enc28j60_net *priv)
/*
* PHY register read
- * PHY registers are not accessed directly, but through the MII
+ * PHY registers are not accessed directly, but through the MII.
*/
static u16 enc28j60_phy_read(struct enc28j60_net *priv, u8 address)
{
@@ -639,8 +640,8 @@ static void nolock_txfifo_init(struct enc28j60_net *priv, u16 start, u16 end)
/*
* Low power mode shrinks power consumption about 100x, so we'd like
- * the chip to be in that mode whenever it's inactive. (However, we
- * can't stay in lowpower mode during suspend with WOL active.)
+ * the chip to be in that mode whenever it's inactive. (However, we
+ * can't stay in low power mode during suspend with WOL active.)
*/
static void enc28j60_lowpower(struct enc28j60_net *priv, bool is_low)
{
@@ -693,7 +694,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)
/*
* Check the RevID.
* If it's 0x00 or 0xFF probably the enc28j60 is not mounted or
- * damaged
+ * damaged.
*/
reg = locked_regb_read(priv, EREVID);
if (netif_msg_drv(priv))
@@ -734,7 +735,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)
/*
* MACLCON1 (default)
* MACLCON2 (default)
- * Set the maximum packet size which the controller will accept
+ * Set the maximum packet size which the controller will accept.
*/
locked_regw_write(priv, MAMXFLL, MAX_FRAMELEN);
@@ -785,7 +786,7 @@ static void enc28j60_hw_enable(struct enc28j60_net *priv)
static void enc28j60_hw_disable(struct enc28j60_net *priv)
{
mutex_lock(&priv->lock);
- /* disable interrutps and packet reception */
+ /* disable interrupts and packet reception */
nolock_regb_write(priv, EIE, 0x00);
nolock_reg_bfclr(priv, ECON1, ECON1_RXEN);
priv->hw_enable = false;
@@ -999,7 +1000,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
/*
* Move the RX read pointer to the start of the next
* received packet.
- * This frees the memory we just read out
+ * This frees the memory we just read out.
*/
erxrdpt = erxrdpt_workaround(next_packet, RXSTART_INIT, RXEND_INIT);
if (netif_msg_hw(priv))
@@ -1107,8 +1108,8 @@ static void enc28j60_tx_clear(struct net_device *ndev, bool err)
/*
* RX handler
- * ignore PKTIF because is unreliable! (look at the errata datasheet)
- * check EPKTCNT is the suggested workaround.
+ * Ignore PKTIF because is unreliable! (Look at the errata datasheet)
+ * Check EPKTCNT is the suggested workaround.
* We don't need to clear interrupt flag, automatically done when
* enc28j60_hw_rx() decrements the packet counter.
* Returns how many packet processed.
@@ -1305,7 +1306,7 @@ static netdev_tx_t enc28j60_send_packet(struct sk_buff *skb,
* packet, you should return '1' from this function.
* In such a case you _may not_ do anything to the
* SKB, it is still owned by the network queueing
- * layer when an error is returned. This means you
+ * layer when an error is returned. This means you
* may not modify any SKB fields, you may not free
* the SKB, etc.
*/
--
2.20.1
next prev parent reply other threads:[~2019-03-18 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 16:10 [PATCH v2 01/13] enc28j60: Use device_get_mac_address() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 02/13] enc28j60: Remove duplicate messaging Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 03/13] enc28j60: Replace dev_*(&netdev->dev, ...) with netdev_*() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 04/13] enc28j60: Drop driver name duplication from messages Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 05/13] enc28j60: Switch to use module_spi_driver() macro Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 06/13] enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 07/13] enc28j60: Switch to dev_<level> from pr_<level> Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 08/13] enc28j60: Convert HW related printk() to dev_printk() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 09/13] enc28j60: Convert printk() to netdev_printk() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 10/13] enc28j60: Remove linux/init.h Andy Shevchenko
2019-03-18 16:11 ` Andy Shevchenko [this message]
2019-03-18 16:11 ` [PATCH v2 12/13] enc28j60: Fix indentation splats Andy Shevchenko
2019-03-18 16:11 ` [PATCH v2 13/13] enc28j60: Convert to use SPDX identifier Andy Shevchenko
2019-03-19 5:23 ` [PATCH v2 01/13] enc28j60: Use device_get_mac_address() David Miller
2019-03-19 10:17 ` Andy Shevchenko
2019-03-19 17:55 ` David Miller
2019-03-19 18:49 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2019-03-19 18:49 [PATCH v2 00/13] enc28j60: messaging clean up and ACPI improvements Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 11/13] enc28j60: Amend comments by fixing typos, adding periods, etc Andy Shevchenko
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=20190318161102.27711-11-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--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).