Skip to content

Commit 8bcd5c6

Browse files
bhadramdavem330
authored andcommitted
net: cpmac: fix comments
This patch convert the normal comments to networking subsystem style comments. Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent af59515 commit 8bcd5c6

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

drivers/net/ethernet/ti/cpmac.c

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");
118118
#define CPMAC_TX_ACK(channel) (0x0640 + (channel) * 4)
119119
#define CPMAC_RX_ACK(channel) (0x0660 + (channel) * 4)
120120
#define CPMAC_REG_END 0x0680
121-
/*
122-
* Rx/Tx statistics
121+
122+
/* Rx/Tx statistics
123123
* TODO: use some of them to fill stats in cpmac_stats()
124124
*/
125125
#define CPMAC_STATS_RX_GOOD 0x0200
@@ -331,8 +331,7 @@ static void cpmac_set_multicast_list(struct net_device *dev)
331331
cpmac_write(priv->regs, CPMAC_MAC_HASH_LO, 0xffffffff);
332332
cpmac_write(priv->regs, CPMAC_MAC_HASH_HI, 0xffffffff);
333333
} else {
334-
/*
335-
* cpmac uses some strange mac address hashing
334+
/* cpmac uses some strange mac address hashing
336335
* (not crc32)
337336
*/
338337
netdev_for_each_mc_addr(ha, dev) {
@@ -432,10 +431,10 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
432431

433432
if ((desc->dataflags & CPMAC_EOQ) != 0) {
434433
/* The last update to eoq->hw_next didn't happen
435-
* soon enough, and the receiver stopped here.
436-
*Remember this descriptor so we can restart
437-
* the receiver after freeing some space.
438-
*/
434+
* soon enough, and the receiver stopped here.
435+
* Remember this descriptor so we can restart
436+
* the receiver after freeing some space.
437+
*/
439438
if (unlikely(restart)) {
440439
if (netif_msg_rx_err(priv))
441440
printk(KERN_ERR "%s: poll found a"
@@ -457,25 +456,27 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
457456

458457
if (desc != priv->rx_head) {
459458
/* We freed some buffers, but not the whole ring,
460-
* add what we did free to the rx list */
459+
* add what we did free to the rx list
460+
*/
461461
desc->prev->hw_next = (u32)0;
462462
priv->rx_head->prev->hw_next = priv->rx_head->mapping;
463463
}
464464

465465
/* Optimization: If we did not actually process an EOQ (perhaps because
466466
* of quota limits), check to see if the tail of the queue has EOQ set.
467-
* We should immediately restart in that case so that the receiver can
468-
* restart and run in parallel with more packet processing.
469-
* This lets us handle slightly larger bursts before running
470-
* out of ring space (assuming dev->weight < ring_size) */
467+
* We should immediately restart in that case so that the receiver can
468+
* restart and run in parallel with more packet processing.
469+
* This lets us handle slightly larger bursts before running
470+
* out of ring space (assuming dev->weight < ring_size)
471+
*/
471472

472473
if (!restart &&
473474
(priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ))
474475
== CPMAC_EOQ &&
475476
(priv->rx_head->dataflags & CPMAC_OWN) != 0) {
476477
/* reset EOQ so the poll loop (above) doesn't try to
477-
* restart this when it eventually gets to this descriptor.
478-
*/
478+
* restart this when it eventually gets to this descriptor.
479+
*/
479480
priv->rx_head->prev->dataflags &= ~CPMAC_EOQ;
480481
restart = priv->rx_head;
481482
}
@@ -506,7 +507,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
506507
priv->dev->name, received);
507508
if (processed == 0) {
508509
/* we ran out of packets to read,
509-
* revert to interrupt-driven mode */
510+
* revert to interrupt-driven mode
511+
*/
510512
napi_complete(napi);
511513
cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
512514
return 0;
@@ -516,8 +518,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
516518

517519
fatal_error:
518520
/* Something went horribly wrong.
519-
* Reset hardware to try to recover rather than wedging. */
520-
521+
* Reset hardware to try to recover rather than wedging.
522+
*/
521523
if (netif_msg_drv(priv)) {
522524
printk(KERN_ERR "%s: cpmac_poll is confused. "
523525
"Resetting hardware\n", priv->dev->name);
@@ -751,7 +753,7 @@ static void cpmac_check_status(struct net_device *dev)
751753
if (rx_code || tx_code) {
752754
if (netif_msg_drv(priv) && net_ratelimit()) {
753755
/* Can't find any documentation on what these
754-
*error codes actually are. So just log them and hope..
756+
* error codes actually are. So just log them and hope..
755757
*/
756758
if (rx_code)
757759
printk(KERN_WARNING "%s: host error %d on rx "

0 commit comments

Comments
 (0)